Wednesday, November 21, 2007

Firefox3 has a problem.

"xul-overlay-merged observer is notified before script elements within the overlay are processed"

https://bugzilla.mozilla.org/show_bug.cgi?id=392515

Well, I guess this could be a work around.

In the <overlay id=...>, we should have <prefpane id=... onpaneload="myInit();">.
So after something like '<script type="application/x-javascript" src="chrome://..." />, 

we use

    <script type="application/x-javascript">
    <![CDATA[
    // UI-specific code
        setTimeout(function () {/*whatever*/},100);
    ]]>
    </script>

Just the onpaneload has no use here.

1 comment:

Anonymous said...

A very creative idea!

I was always facing problems using Firefox's preference system. Sometimes 'onpaneload' fires somtimes it doesn't. Absolutely annoying.

Your workaround is perfectly fixing this problem. Extension writing is fun again.

Thanks a lot for sharing.