From ff53e03cff51a33dad1101c13ec89f0c4762b205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Thu, 22 Jan 2026 15:59:00 +0100 Subject: [PATCH 1/4] Add Marker interface This node is intended for the ``, `` and `` syntax, to be created by the HTML parser. --- dom.bs | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/dom.bs b/dom.bs index bb16cf551..4b40a71ba 100644 --- a/dom.bs +++ b/dom.bs @@ -4421,6 +4421,7 @@ interface Node : EventTarget { const unsigned short DOCUMENT_TYPE_NODE = 10; const unsigned short DOCUMENT_FRAGMENT_NODE = 11; const unsigned short NOTATION_NODE = 12; // legacy + const unsigned short MARKER_NODE = 13; readonly attribute unsigned short nodeType; readonly attribute DOMString nodeName; @@ -4520,6 +4521,9 @@ get a direct instance of it.
{{DocumentFragment}}
{{Node}} . {{Node/DOCUMENT_FRAGMENT_NODE}} (11). + +
{{Marker}} +
{{Node}} . {{Node/MARKER_NODE}} (13).
node . {{Node/nodeName}} @@ -4586,6 +4590,9 @@ statement, switching on the interface this implements:
{{DocumentFragment}}
DOCUMENT_FRAGMENT_NODE (11). + +
{{Marker}} +
MARKER_NODE (13).

The nodeName getter steps are to return the first matching @@ -8550,6 +8557,42 @@ constructor steps are to set this's data to +

Interface {{Marker}}

+ +
+enum MarkerType { "marker", "start", "end" };
+
+[Exposed=Window]
+interface Marker : Node {
+  constructor(MarkerType type, optional DOMString name = "");
+
+  readonly attribute MarkerType type;
+  readonly attribute DOMString name;
+};
+
+ +
+
marker = new Marker(type [, name = ""]) +
Returns a new {{Marker}} node whose type is type and + name is name. +
+ +

{{Marker}} nodes are simply known as +markers. + +

Markers have an associated +type and +name. + +

+

The new Marker(type, name) +constructor steps are to set this's type to type, this's +name to name, and this's node document to +current global object's associated Document. +

+ + +

Ranges

From 577e5d09da5db21453675c57109c286806258969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 27 Jan 2026 09:21:46 +0100 Subject: [PATCH 2/4] Marker includes NonDocumentTypeChildNode --- dom.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/dom.bs b/dom.bs index 4b40a71ba..a081363f9 100644 --- a/dom.bs +++ b/dom.bs @@ -3621,6 +3621,7 @@ interface mixin NonDocumentTypeChildNode { }; Element includes NonDocumentTypeChildNode; CharacterData includes NonDocumentTypeChildNode; +Marker includes NonDocumentTypeChildNode;
From 592ac680472febbc7534a358a1ad595f3add0580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 27 Jan 2026 09:29:00 +0100 Subject: [PATCH 3/4] Add nodeName #marker and NodeFilter constant SHOW_MARKER --- dom.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom.bs b/dom.bs index a081363f9..55a4432a2 100644 --- a/dom.bs +++ b/dom.bs @@ -4558,6 +4558,9 @@ get a direct instance of it.
{{DocumentFragment}}
"#document-fragment". + +
{{Marker}} +
"#marker".
@@ -10571,6 +10574,7 @@ callback interface NodeFilter { const unsigned long SHOW_DOCUMENT_TYPE = 0x200; const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400; const unsigned long SHOW_NOTATION = 0x800; // legacy + const unsigned long SHOW_MARKER = 0x1000; unsigned short acceptNode(Node node); }; @@ -10602,6 +10606,7 @@ JavaScript function.
  • SHOW_DOCUMENT (256, 100 in hexadecimal);
  • SHOW_DOCUMENT_TYPE (512, 200 in hexadecimal);
  • SHOW_DOCUMENT_FRAGMENT (1024, 400 in hexadecimal). +
  • SHOW_MARKER (4096, 1000 in hexadecimal). From 8c6de01e017db998e6eb5abfc36601f6e45e9e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 27 Jan 2026 13:09:09 +0100 Subject: [PATCH 4/4] Define cloning Marker nodes --- dom.bs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom.bs b/dom.bs index 55a4432a2..a836aa42d 100644 --- a/dom.bs +++ b/dom.bs @@ -5045,6 +5045,10 @@ and an optional document docume

    Set copy's target and data to those of node. +

    {{Marker}} +

    Set copy's type and name to those of + node. +

    Otherwise

    Do nothing.