Re: [w3c/selection-api] Specify the behavior when DOM mutation occurs across shadow-crossing selection (Issue #168)

In your test, you are checking the effect of removing the Shadow host when the Live Range of the current selection is inside the shadow root. For the Selection's Live Range, I believe Chrome is doing the specced behavior. The range should stay within the shadow root's tree scope, even when the the host is removed. No collapsing and boundary points need to be changed.

For the Selection's Composed Range (not defined yet, but this is not the output of getRangeAt), we can compare ancestors while crossing the shadow boundaries. In this case, I would expect the behavior Safari is doing. I added more [tests](https://github.com/web-platform-tests/wpt/commit/dcf26fe3682cc402e6a6593c3827016ee4135be8) for the new getComposedRanges() API.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/168#issuecomment-2420230585
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/selection-api/issues/168/2420230585@github.com>

Received on Thursday, 17 October 2024 18:19:06 UTC