[Greasemonkey] GM load order

csaba2000 csaba2000 at yahoo.com
Sun Apr 23 12:44:16 EDT 2006


Is there any possible way to have a GM script execute BEFORE the <body>
portion of a page starts being loaded?

Motivation: Textareas are often problem children within the DOM.  There are
numerous bugs with their layout, especially as concerns selections.  As a
workaround for some of these issues, I need to clone and replace existing
textareas under certain circumstances.  That's all well and good, only the
event handlers don't get transferred.  No problem, thinks I, I'll just usurp
.addEventListener, .removeEventListener, and .cloneNode and put in my piece
of magic to make sure the event handlers get handled in the event of a
cloneNode.

The problem is that if the script on the page gets executed before my GM
script (which is what the case seems to be), then script in the page can add
event listeners which it will be too late for me to trap for, hence
transfer.

Any suggestions?
Thanks,
Csaba Gabor from Vienna
--
View this message in context: http://www.nabble.com/GM-load-order-t1495563.html#a4053543
Sent from the MozDev - greasemonkey forum at Nabble.com.



More information about the Greasemonkey mailing list