[Jslib] Problem with two extensions including JSLIB

Henrik Gemal spam at gemal.dk
Mon Nov 22 16:29:28 EST 2004


Here's a problem I dont know how to fix. I'm not sure if it's a 
extension problem or a JSLib problem:

Two extensions are including JSLib inside the extension itself so that 
people dont have to install JSLib first and the afterwards install the 
extension.

The problem is now namespace. Because both extensions are including 
JSLib there's a namespace error causing one extension, the one that's 
loaded last, to stop working.

This is because you get a JS error
Error: redeclaration of const JS_LIB_LOADED
Source File: chrome://launchy/content/jslib/jslib.js
Line: 32

what is the correct way to include JSLib in an extension?
Asking users to install JSLib first themself is not an option. They may 
also uninstall it later, etc.

Do I really really need to change all JS_LIB to something like 
LAUNCHY_JS_LIB?

I've opened a bug about it:
http://bugzilla.mozdev.org/show_bug.cgi?id=8070

Help...:)

-- 
Henrik Gemal
Mozilla Evangelist

Mozilla Blog with news, devinfo, links, etc:
http://gemal.dk


More information about the Jslib mailing list