[Greasemonkey] Re: Problems with 0.5.1

WHITEMARE2 whitemare2 at delphiforums.com
Tue Aug 30 11:55:49 EDT 2005


I have a script that runs on two pages at Delphiforums that has an eventListener on the window load event.  It worked fine in 0.3.5.  With 0.5.1 the load event fires almost every time on one page, but never fires on the other page.  The page where the load event does not work is smaller and loads much quicker than the page where the load event works.

I also had problems with the load event causing an infinite loop in 0.5.1.  The script creates an iframe which is used for a rich text editor.  I attempted to put an eventListener on the load event of the iframe instead of the window, but this caused an infinite loop and I had to abort Firefox to get out of it.  I tried adding a removeEventListener to prevent the infinite loop, but that did not work.

I ended up using the load event on the window, plus added a call to a function at the end of the script to set the designMode of the iframe so that both pages would work.

Script is here:

http://people.delphiforums.com/WHITEMARE2/editor/dfRTEtest017.user.js

> 
> Message: 8
> Date: Mon, 29 Aug 2005 11:07:02 -0400
> From: Mark Pilgrim <pilgrim at gmail.com>
> Subject: [Greasemonkey] problems with 0.5.1, onload
> To: greasemonkey at mozdev.org
> Message-ID: <14be96d3050829080713edea1b at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> This script fails 9 times out of 10 (but not 10 times out of 10):
> 
> window.addEventListener('load', function() { alert('onload'); }, true);
> 
> GM 0.5.1, Firefox 1.0.6, fresh profile, Windows XP (though I saw the
> same behavior last night on OS X).
> 
> -- 
> Cheers,
> -Mark
> 
> ------------------------------
> 
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
> 
> 
> End of Greasemonkey Digest, Vol 9, Issue 85
> *******************************************



More information about the Greasemonkey mailing list