--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
--
// Example code, adds event to the "Google" image on www.google.com
// which writes "Hello world!" to the console, creates 'bla' from the
// original function, then replaces the old event with a new event
// which calls a new function that also executes the original function
// ('bla').
document.getElementById('lga').firstChild.onclick=function()
{console.log('Hello world!');}
bla = document.getElementById('lga').firstChild.onclick;
document.getElementById('lga').firstChild.onclick=function()
{console.log('Again!'); bla()}
It appears to work whether the event is added via javascript or via the
onclick attribute. It's hacky, sure, but it works. ;-)
> To unsubscribe from this group, send email to chromium-extensions
> +unsub...@chromium.org.
> For more options, visit this group at
> http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
--
Ben