insertAdjacentHTML should return a NodeList
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 28
- Forks
- 14
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 1
Description
I was referred here by annevk as WHATWG deals with insertAdjacentElement() spec, whilst w3c manages insertAdjacentHTML() spec - a bit confusing to a newcomer :)
At the moment of writing insertAdjacentElement() returns the resulting element, yet insertAdjacentHTML() doesn't have a return value. In my mind it should return a NodeList if successful. Has this been discussed in the past? Having a return (NodeList or otherwise) removes the need to do a querySelector/querySelectorAll/getElementByID after insertion - making it cleaner to use.
It makes more sense to me than the insertAdjacentElement() use case, where you already have a pre-existing reference to the attached element - however insertAdjacentHTML() starts from scratch, necessitating the lookup after insertion if you want to reference it later.
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 by reading the insertAdjacentHTML and insertAdjacentElement specifications referenced in the issue, then review the DOM Parsing repository's current specification entry points. Done means the standards discussion reaches a documented decision about whether insertAdjacentHTML should return a value and what that value should be.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100