-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Modifying <style> does not affect getComputedStyle #981
Comments
I think this would be fixed by Sebmaster@637aca4. Can you cherry-pick that commit and try with that @denis-sokolov? |
The commit referenced is about a |
I suppose the very same function using |
Nah, I was wrong. @denis-sokolov |
@mciparelli Thanks for testing it out.
|
I'm getting style.textContent = 'whatever'; and style.firstChild.textContent = 'whatever'; |
It should be fine with your commit. I don't see anyone using the latter for modifying a stylesheet contents. |
I'm curious about the status of this issue and the above fix. I have some code that modifies stylesheets that I was trying to test and ran into this issue. I have tested the code linked above and it catches my modifications that use |
We want a comprehensive fix that also deals with |
The modern way to listen for text content changes is to add a |
<style>
element affects styles only when inserted to DOM:But not when its contents are updated:
jQuery is unrelated, effect confirmed with
window.getComputedStyle
.The text was updated successfully, but these errors were encountered: