modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.15k stars 271 forks source link

fix(parse5-utils): add support for templates in `findNode` #2751

Open WillsonSmith opened 1 month ago

WillsonSmith commented 1 month ago

What I did

  1. Add a shared helper function for findNode and findNodes to find child nodes within <template> elements
  2. Enable findNode to find children within a <template> element
  3. Add a test for findNode

This expands on #2398 which added this functionality to findNodes.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 87afd9af92d53a45bee74c28f4bf4c93383bbce3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @web/parse5-utils | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

WillsonSmith commented 7 hours ago

Always happy to contribute, thanks for taking the time to review this! 😄