[Greasemonkey] Greasemonkey and GMail

Tony Chang tony at ponderer.org
Thu Aug 18 18:01:35 EDT 2005

On Thu, Aug 18, 2005 at 05:32:30PM -0400, Nikolas Coukouma wrote:

> I think mutation events are the real answer. You can add an event
> listener at every node for subtree mutations, to prevent a script from
> capturing and calling stopPropogation. At the very top is document and
> it is const(ant). Otherwise, you could copy the DOM, sans event
> listeners, from the top-down.

To my knowledge, DOMSubtreeModified hasn't been added to Firefox and a
test on Deer Park Alpha 2 seems to confirm that. [1]  I also didn't get an
alert in your example that said "Something changed!! (mutation)".

On the other hand, DOMNodeInserted and DOMNodeRemoved are valid events,
but adding the events directly results in events being fired before the
page finishes rendering and adding it on load is too late. [2]

DOM mutation doesn't seem to be able to detect GM unless the mutations
occur after page load.


[1] Actuall, I hope someone proves me wrong and tells me how to use
DOMSubtreeModified correctly.

[2] http://ponderer.org/tests/dommodified.html

Tony Chang

More information about the Greasemonkey mailing list