If been doing some exploritory work on trying to get alternative stylesheets to work.  I tried this from js in my OnLoad:
dump("style: "+document.styleSheets+"\n");
I get:
JavaScript error:
 line 0: uncaught exception: [Exception... "Object is of wrong type"  code: "1002" nsresult: "0x805303ea (NS_ERROR_DOM_WRONG_TYPE_ERR)"  location: "chrome://navigator/content/test.js Line: 9"]
I've been doing some looking in  mozilla/dom/src/coreDOM/nsJSDocument.cpp and I tracked my error down to
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
...
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_DOCUMENTSTYLE_STYLESHEETS, PR_FALSE);
rv comes up NS_FAIL and then returns NS_ERROR_DOM_WRONG_TYPE_ERR.

How do I set privaliges or is there something else I need to do?

-eric

-- 
----
Eric Plaster                    Universal Talkware Corp
Senior Software Engineer        (612)843-6711
[EMAIL PROTECTED]            http://www.talkware.net
 

S/MIME Cryptographic Signature



Reply via email to