[Greasemonkey] 'onclick' handler in more than one place ?
Bogdan Harjoc
harjoc at gmail.com
Sat Jun 3 04:27:06 EDT 2006
Hi,
In trying to write a script that copies a clickable 'span' element
somewhere more accesible in yahoo mail (namely "Check all"
and "Clear all") I do this after locating what and where to copy:
span.appendChild(link.cloneNode(true))
While this does put a copy of the text in place with the correct
style, etc., it doesn't seem to copy the handler for 'onclick'.
The code works for a simple test page (clicking the original text
and the cloned one calls the handler). But yahoo's clickable spans
don't seem to have an 'onclick' attribute set after all.
My question is, how do the 'onclick' handlers get attached to
those spans ? (doing the cloning after a 5s timeout started in
window.onload does not work either, fwiw). Any hint will be
appreciated.
Cheers,
Bogdan
More information about the Greasemonkey
mailing list