-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Add support for css in content_scripts #10076
Add support for css in content_scripts #10076
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, can you rebase the commit on master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexstrat can you rebase this to resolve the conflict?
Also, could you provide tests for this?
3b0d710
to
e1a232e
Compare
I have rebased the commit and am merging the pull request, currently we don't have a way to test extension APIs, and adding tests for it is better to be put in another pull request. |
for (const {code} of script.css) { | ||
process.once('document-end', () => { | ||
var node = document.createElement('style') | ||
node.innerHTML = code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to use node.textContent = code
instead to ensure child elements aren't created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good suggestion, do you want to create a PR for it?
No description provided.