w3c/csswg-drafts

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

Open

#556 aperta il 30 set 2016

Vedi su GitHub
 (54 commenti) (0 reazioni) (0 assegnatari)HTML (545 fork)batch import
Help WantedNeeds EditsNeeds Testcase (WPT)cssom-view-1topic: shadow

Metriche repository

Star
 (3546 star)
Metriche merge PR
 (Merge medio 87g 7h) (24 PR mergiate in 30 g)

Descrizione

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.

Guida contributor