Skip to content

<style> should use child text content changed steps #2996

Closed

Description

@domenic

Currently it says

The element is not on the stack of open elements of an HTML parser or XML parser, and one of its child nodes is modified by a script.

This should be formalized, probably by using the somewhat-new child text content changed steps. However, this would probably depend on #2995, since XML-based styling languages need something more like "descendant changed steps".

See also:

For styling languages that consist of pure text (as opposed to XML), a style element's style data is the child text content of the style element. For XML-based styling languages, the style data consists of all the child nodes of the style element.

It's also worth testing that it truly is child text content, and not descendant text content (i.e. the value of textContent), by using DOM manipulation APIs to insert child nodes that wrap extra style rules (e.g. <span>s or even <style>s), and ensuring that those rules are not applied.

If we can resolve #2995 one way or another we can morph this into a "good first bug".

Activity

  1. self-assigned this
    on Sep 7, 2017
  2. added 2 commits that reference this issue on Sep 8, 2017
    509e84f
    34d65dd
  3. added a commit that references this issue on Sep 14, 2017
    9c612ac
  4. added a commit that references this issue on Jan 8, 2019
    771c5b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions