[Jslib] jslib_file is not defined

Pete Collins pete at mozdevgroup.com
Mon Mar 15 10:06:30 EST 2004


> When I run this (by doing Firefox: File, Open File), I get the 
> following javascript error in the js console:
>
> jslib_file is not defined
>
> I have not changed any security settings in the browser.
>
> What am I missing? Thank you in advance for any suggestions.
>
>
This is a common error I see over an over. I need to add this to the 
jslib docs or an FAQ.

Take a look here:

  http://books.mozdev.org/html/mozilla-chp-5-sect-4.html#mozilla-CHP-5-EX-11

Try adding this line to the top of your js code.

 

netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 

When working from any local files that are *not* behind the chrome 
registry, you need access to xpconnect via the above call.

--pete

-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com




More information about the Jslib mailing list