Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document.documentElement and document.head are unavailable @ document-start #16

Closed
nstepien opened this issue Sep 14, 2012 · 6 comments
Closed
Assignees
Milestone

Comments

@nstepien
Copy link

See title.

This works:

  • on Firefox with Greasemonkey,
  • on Opera,
  • on Chrome (except document.head),

but not with scriptish.

@supahgreg
Copy link
Contributor

In Scriptish, @run-at document-start scripts get injected at content-document-global-created, which is before the root element gets inserted. Greasemonkey (and maybe others) use document-element-inserted.

https://developer.mozilla.org/docs/Observer_Notifications

@supahgreg
Copy link
Contributor

Whether Scriptish's behavior should be modified is up for debate. Offhand I can't come up with an example where you'd need to get in before document-element-inserted.

@nstepien
Copy link
Author

I don't think there's much debate to be had when the userscript implementations that matters offer the elements we need at document-start.

@dindog
Copy link
Contributor

dindog commented Sep 20, 2012

Does the current implement affect addStlye()? I thought the GM_addStyle is actually creates a style element than appends it to the page...

@CoolCmd
Copy link

CoolCmd commented Dec 22, 2012

Scriptsh's implementation of document-start useless and must be changed.
At least I shall get access to documentElement or GM_addStyle for preventing flicker.

@erikvold
Copy link
Member

Alright let's delay injection to conform with the other engines, we can add a new @run-at if desired.

@ghost ghost assigned erikvold Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants