Skip to content

Should define when stylesheets are removed. #4029

Open
@emilio

Description

@emilio

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions