- From: Dan Clark <notifications@github.com>
- Date: Thu, 10 Sep 2026 08:26:21 -0700
- To: w3c/selection-api <selection-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 10 September 2026 15:26:25 UTC
dandclark left a comment (w3c/selection-api#361) Discussed in September meeting: The spec is probably wrong here. Chromium and Firefox both pass the test, Safari fails. But the test is not directly focused on all the cases we might care about here, it's more focused on selection collapsing. In particular, there is a a question of whether `anchorNode`/`focusNode` should be [retarget](https://dom.spec.whatwg.org/#retarget) their result into the light DOM before returning (which is probably more correct), or whether they should just return a shadow node directly (which is what Chromium and Firefox seem to do). The next step would be to write a WPT focused on these scenarios: - When selection is in a shadow DOM, including cases with nested shadow DOMs, what do `focusNode`/`anchorNode` return? The node itself, null, or the node retargeted into the light DOM? - When selection is on a node that's `<slot>`ted into a shadow DOM, what gets returned for `focusNode`/`anchorNode`? The slotted node, the slot, the shadow host, null? -- Reply to this email directly or view it on GitHub: https://github.com/w3c/selection-api/issues/361#issuecomment-5621136170 You are receiving this because you are subscribed to this thread. Message ID: <w3c/selection-api/issues/361/5621136170@github.com>
Received on Thursday, 10 September 2026 15:26:25 UTC