event listeners on plugin in document.onload events in opera
- by gf
I am trying to understand an issue where event-listener registration on plugins doesn't work in Opera unless i delay them.
In particular, this doesn't work:
document.onload = function() {
plugin.addEventListener("foo", function() { alert('onFoo'); }, false);
}
while delaying the addEventListener() call somewhat through e.g. an alert() does:
document.onload = function() {
alert('onload()');
plugin.addEventListener("foo", function() { alert('onFoo'); }, false);
}
It seems that plugins are only loaded after document.onload.
As a non-web-developer, am i missing something simple here? Or is this a known Opera problem with a common work-around?