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

Should define when stylesheets are removed. #4029

Open
emilio opened this issue Sep 12, 2018 · 0 comments
Open

Should define when stylesheets are removed. #4029

emilio opened this issue Sep 12, 2018 · 0 comments

Comments

@emilio
Copy link
Contributor

emilio commented Sep 12, 2018

Right now this logs a CSSStyleSheet object and then null in every browser:

<!doctype html>
<style>div { color: green }</style>
<script>
  let s = document.querySelector('style');
  console.log(s.sheet); // [CSSStyleSheet]
  s.remove();
  console.log(s.sheet); // null
</script>

This should be in the spec. Similarly when rel attribute changes and such. Also when the element becomes disconnected, per the discussion in w3c/csswg-drafts#3096.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants