Re: [whatwg/dom] Add Marker interface (PR #1447)

foolip left a comment (whatwg/dom#1447)

I found https://github.com/whatwg/dom/issues/1007 via [list archives](https://www.w3.org/Search/Mail/Public/search?keywords=SHADOW_ROOT_NODE&indexes=Public), but it's not a discussion on whether constant should be added or not.

From a search of Chromium commit messages and WebKit bugs, I found some decisions:

- In https://bugs.webkit.org/show_bug.cgi?id=58704, `SHADOW_ROOT_NODE` (14) was added to Node.h but seemingly not as a web-exposed constant on `Node`. (At the time there was also a `XPATH_NAMESPACE_NODE` as number 13.)
- In https://bugs.webkit.org/show_bug.cgi?id=76693, `ShadowRoot` was made to inherit from `DocumentFragment` instead of `Node`
- In https://bugs.webkit.org/show_bug.cgi?id=77514, `SHADOW_ROOT_NODE` was removed again, referring to what the spec said.

I haven't looked at the spec history, but from this I gather the reasoning was that the new constant should only be added if the new interface inherits directly from `Node`, as it cannot be avoided in that case. Since we're suggesting that `Marker` inherit from `Node`, it will need a new type and we'll need to consider it in places like `NodeIterator` and `TreeWalker` as well.

We will also need a new "#marker" return value for `node.nodeName`, and probably a bunch of other little changes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1447#issuecomment-3785910672
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1447/c3785910672@github.com>

Received on Thursday, 22 January 2026 18:04:54 UTC