Element.outerHTML setter specification doesn't match majority of browsers
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 28
- Forks
- 14
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 1
Description
While working on trying to align WebKit's Element.outerHTML setter with other browsers, I noticed a few issues:
- WebKit & Blink have logic in the setter to merge with the previous & next Text nodes after inserting the fragment. This is not present in the specification and Gecko doesn't seem to implement it.
- WebKit & Blink throw a NoModificationAllowedError if the parent is not an Element while the specification allows setting outerHTML when the parent is a DocumentFragment. Gecko doesn't throw so they may be matching the spec here, not sure.
- The specification says that we should early return without throwing if the parent is null. Per point 2, WebKit & Blink throw a NoModificationAllowedError instead. It seems Gecko matches the spec.
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 comparing the outerHTML setter specification with the WebKit, Blink, and Gecko behavior described in the issue. Review the three discrepancies around text-node merging, DocumentFragment parents, and null parents, then identify the agreed specification change or browser behavior to document. Done means the mismatch is resolved with a clear, reviewed outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100