w3c/csswg-drafts

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

Open

#556 创建于 2016年9月30日

在 GitHub 查看
 (54 评论) (0 反应) (0 负责人)HTML (545 fork)batch import
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.

贡献者指南