Allow accessing text in a shadow tree
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 718
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
Right now Get Element Text will return the empty string if the text is contained in a shadow tree unless it happens to come from a slot defined in the shadow host. Because the js atoms for Get Element Text are running in content js they can't access closed shadow trees, so fixing this may require users to opt in to some other Get Element Text implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Get Element Text command and the JavaScript atoms running in content JS; the issue identifies closed shadow trees as the access constraint. Determine whether an opt-in implementation is needed, and define coverage for text in shadow trees, including slotted content. Done means Get Element Text can return the relevant shadow-tree text without violating closed-tree access rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- api, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100