[Greasemonkey] Execution Order

Gareth Simpson g.simpson at zoo-tech.com
Tue Aug 16 09:46:38 EDT 2005


Hi,
 
Can someone tell me what the expected execution order of Greasemonkey
scripts is in 0.5?

I have a script which I want to run after all scripts on the target page
have completed execution.
 
In 0.3 I was intercepting the load event of the window and adding my
functionality there.  This doesn't work in 0.5.
 
In 0.5 all the scripts on the page (including those called from the load
event) seem to execute followed by the Greasemonkey scripts.

Except when they don't.  Sometimes scripts in the load event seem to execute
simultaneously with the Greasemonkey scripts.
 
You (or at least I) can see the effect on these pages using the linked
script :
 
http://xurble.org/userscripts/order.html
<http://xurble.org/userscripts/order.html> 
 
Navigating between the test pages, mostly I get a sequence of alert boxes -
"Page Bottom", "On Load", "Greasemonkey".  Occasionally though I get "Page
Bottom" and then "On Load" and "Greasemonkey" simultaneously.
 
I'm using FF 1.0.4
 
Is this a known issue, a gap in my understanding or something new?

Cheers 
 
Gareth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050816/d406e8fc/attachment.htm


More information about the Greasemonkey mailing list