w3c/csswg-drafts

[cssom-view] elementFromPoint, elementsFromPoint, and caretPositionFromPoint should not return an element inside a shadow tree

Open

#556 geöffnet am 30. Sept. 2016

Auf GitHub ansehen
 (54 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)HTML (545 Forks)batch import
Help WantedNeeds EditsNeeds Testcase (WPT)cssom-view-1topic: shadow

Repository-Metriken

Stars
 (3.546 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 87T 7h) (24 gemergte PRs in 30 T)

Beschreibung

elementFromPoint and elementsFromPoint should not return an element inside a shadow tree. Instead, it should look for the highest shadow host of the element and return that instead so that it doesn't leak an element in shadow trees.

See the shadow DOM specification.

More precisely, once these methods are added on DocumentOrShadowRoot interface, then we need to retarget the element we found against the context object.

Contributor Guide