ampproject / ampproject/worker-dom

Bug: querySelectorAll should not traverse into <template>

Open
#1,078 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.3k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

**summary**

The querySelector functions should stop traversing when a `` is found.
Currently, they match elems within a template.

Contributor guide

Open the contributing guide

Research direction

Start by locating the querySelector and querySelectorAll implementations and their traversal tests. Reproduce the issue with an element inside a , then add a regression test showing that template descendants are not matched. Done means both query functions stop traversing at templates.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.