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

Support for adding to specific elements #26

Open
refi64 opened this issue Apr 29, 2017 · 1 comment
Open

Support for adding to specific elements #26

refi64 opened this issue Apr 29, 2017 · 1 comment

Comments

@refi64
Copy link

refi64 commented Apr 29, 2017

Right now, insertionQuery adds the style element directly to document.head, and the event listener is placed directly on the document. This is a problem, though, because it makes it impossible for a web component to use insertionQuery on its own shadow DOM!

A "fix" would be to allow a custom root element to be specified (since you can put style tags in the body) instead.

@naugtur
Copy link
Owner

naugtur commented Apr 30, 2017

great idea.

I'm not sure if I'll have the chance to get down to it soon, so feel free to try a pull request. I can help you out.

Conceptually, this would go in the function as an optional styleParent value that defaults to document.head

Let me know if you're interested.

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

2 participants