In an older script I used
var iframe = unsafeWindow.document.getElementById('myIframe');
iframe.onload = function () {
…
}
Which worked fine. Although here
(http://commons.oreilly.com/wiki/index.php/Greasemonkey_Hacks/Getting_Started#Pitfall_.231:_Auto-eval_Strings)
it says that event handlers should be attached differently.
As the script did not work any more in GM4/FF57, I changed it to:
var iframe = document.getElementById('myIframe');
iframe.addEventListener("onload",
function () {
…
},
true);
But that did not seem to help. So currently I use a setTimeout() in order
to execute the code working on the iframe's contents some seconds later,
when the contents of that iframe have most likely been loaded. But of
course I would like to go back to an event driven solution.
Any help would be appreciated.
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.