w3c/csswg-drafts
在 GitHub 查看[cssom-view] elementFromPoint, elementsFromPoint, and caretPositionFromPoint should not return an element inside a shadow tree
Open
#556 创建于 2016年9月30日
Help WantedNeeds EditsNeeds Testcase (WPT)cssom-view-1topic: shadow
仓库指标
- Star
- (3,546 star)
- PR 合并指标
- (平均合并 87天 7小时) (30 天内合并 24 个 PR)
描述
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.