Conditional inclusion of JS for cross-browser extension (was Re:
[Project_owners] Extension works only once on FF 1.5)
thaths at openscroll.org
Wed Nov 30 19:48:34 EST 2005
I have isolated where the problem is occurring. On top of my XUL I have
The first time I load my extension, there is an warning message printed
into JS Console but the extension loads just fine. The execution takes
me through all the checkpoints 0, 1 and 2. However, the second time I
try to run my extension, the execution only reaches up to Checkpoint 0.
The execution never reaches Checkpoint 2.
I understand why this is happening - chrome://communicator/... does not
exist in Firefox. It is a Mozilla thing.
However, my problem is that I want my application to run both inside
Firefox and Mozilla. How do I conditionally include
chrome://browser/.../bookmarks.js for FF and
chrome://communicator/.../bookmarks.js for Mozilla?
Is there a more elegant way of doing this than a conditional (if()) with
Gareth Hunt wrote:
> Hi Thaths,
> by a missing preference not stored after the initial run.
> --- Sudhakar Chandra <thaths at openscroll.org> wrote:
>>My extension (habarixenu.mozdev.org) works the first time it is
>> in Firefox 1.5 - it opens up a chrome xhtml file in a new tab where
>>chrome xul file is opened inside an frame. But when I close this tab
>>try to relaunch the application, the xhtml loads but not the xul. I
>>tried typing in the chrome:// url of the xhtml or the xul directly
>>still the xul does not load. This happens only with FF 1.5. The
>>extension works fine with FF 1.0.7 any number of times.
> Gareth Hunt
> gareth-hunt at rocketmail.com
> To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
> Project_owners mailing list
> Project_owners at mozdev.org
"Anyone who believes in telekinesis, raise my hand." -- Kurt Vonnegut
Slacker Without Borders http://openscroll.org/
Key fingerprint = 8A 84 2E 67 10 9A 64 03 24 38 B6 AB 1B 6E 8C E4
More information about the Project_owners