Re: [csswg-drafts] [css-highlight-api] invalidation of static ranges (#4597)

The invalidation logic at https://drafts.csswg.org/css-highlight-api-1/#range-invalidation seems reasonable.

In addition to checking whether the start and end node are both [in a document tree](https://dom.spec.whatwg.org/#in-a-document-tree), I wonder if this should check if they are in the *same* document tree.  For example if either the start or end container is adopted into a same-domain iframe document we should probably treat the range as invalid.

Checking that the range doesn't cross the boundary of a contained element per #4598 could also be an addition here.

-- 
GitHub Notification of comment by dandclark
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4597#issuecomment-748281145 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 18 December 2020 19:33:33 UTC