get_ancestors
Trace the full ancestor chain of a CSS element with style properties like overflow, position, and transform to diagnose sticky, overflow, and z-index stacking bugs.
Instructions
获取元素的完整祖先链,每个祖先节点包含指定样式属性值。专为 sticky/overflow/z-index 层叠问题根因定位设计。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxDepth | No | 最多追溯几层祖先,默认 20,最大 20 | |
| selector | Yes | CSS 选择器,定位目标元素 | |
| styleProperties | No | 要在每个祖先节点查询的样式属性,默认 ["overflow","position","transform","will-change","contain"] |