You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 12, 2020. It is now read-only.
Chrome's version (at least the port to Windows) runs well before the window load event fires. This, as with all pageMods from the Add-on SDK, runs after.
(NB: I prefer after, since I can just manage the DOM as it already exists, but, meh.)
It's worth considering finding a way to make these compatible. The issue I ran into is that for Chrome, I need to add an onload handler, and for Firefox, load has already fired before this runs, so adding a handler doesn't work.
If I'm the only one to hit this, it's probably the chrome dotjs Windows port's fault.
The text was updated successfully, but these errors were encountered:
Basically, no. Also, and I freel yadmit this is an implementation detail, window.onload if we supported it is dangerously misleading in a content script. Content scripts are in their own sandbox so window is actually a proxy. If we let a content script set the real window.onload this would do two things:
override whatever was set there ( although real web hackers don't use window.onload anyway )
open up a channel between the real window and the content script, possible creating a security problem.
Dunno, IMO window.onload use causes the death of many many kittens at the hands of a ruthless and bloodthirsty old-testament-type god. I can't recommend it.
We could play around with using contentScriptWhen: 'start', for example, but I don't think that will do what we want most of the time.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Chrome's version (at least the port to Windows) runs well before the window
load
event fires. This, as with allpageMods
from the Add-on SDK, runs after.(NB: I prefer after, since I can just manage the DOM as it already exists, but, meh.)
It's worth considering finding a way to make these compatible. The issue I ran into is that for Chrome, I need to add an onload handler, and for Firefox, load has already fired before this runs, so adding a handler doesn't work.
If I'm the only one to hit this, it's probably the chrome dotjs Windows port's fault.
The text was updated successfully, but these errors were encountered: