I am working on a greasemonkey script for gmail where i need to make a copy of the "Inbox" link. Using cloneNode works ok, but i think there's an onclick event that gets attached to it at runtime. So, this is a two part question: 1. Is there a way to see what events are attached to a node? 2. Is there a way to copy those events as well? The closest thing i found was jQuery, and i am not ready to go there yet. Thanks!
onclick
attribute on the element.onclick
attribute, but whether that will continue to work depends on if it was used and what it does).You're better off adding your own click
handler, and then triggering that event on the original... Or simulating the behavior in some other way.