firefox - I am unable to access docShell for my browser element in xul? -
firefox - I am unable to access docShell for my browser element in xul? -
<browser id="search" type="content-targetable" src="www.google.com"> </browser>
javascript code
// using script set property of browser element var x=document.getelementbyid('search'); x.docshell.allowauth="false" // code stops here x.docshell.allowplugin="false" //this not work
as many xul tags, <browser>
tag isn't inherently "special" - "special" functionality added xbl. of import thing xbl bindings added via css rules , these css rules apply element has inserted document. of import insert element first , access special properties after that. of course, in case asynchronous initialization might required improve like:
var browser = document.createelement(browser); parent.appendchild(browser); window.settimeout(initbrowser, 0); function initbrowser() { x.docshell.allowauth = false; ... browser.loaduri("...", null, null); }
note it's docshell
(your illustration used wrong captalization) , allowauth
boolean, not string.
firefox browser firefox-addon xul
Comments
Post a Comment