Skip to content

[css-highlight-api] Use marker nodes to declaratively annotate highlights #13381

@noamr

Description

@noamr

An emerging feature in HTML, out of order streaming, is converging towards creating a new node type called "marker", currently proposed as something like:

<!mark name="some-void-range">
<!start name="some-range">
Stuff
<!end name="some-range">

This marker annotates a range, and is used by a corresponding template to "patch" that range declaratively.

This feature can be extended to work nicely with highlights, as it uses the same concepts of naming ranges, though with slightly different semantics (range names are scoped to an element and patching only finds flat ranges), and with missing semantics related to highlights in particular (type, priority).

Opening this issue to start this thinking going, as using this can relieve the use of JS for creating ranges for the purposes of highlighting.

We would need to:

  1. See if this makes sense in general
  2. See how to coordinate the scope of resolving the name
  3. We might need a new type of AbstractRange, as those ranges are not exactly live ranges.
  4. See how we can express priority/type.

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