Sort out what's happening with innerHTML on <script> and <style> in XML documents
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 28
- Forks
- 14
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 1
Description
In at least Chrome, Safari, and Firefox, it looks like this:
var style = document.createElementNS("http://www.w3.org/1999/xhtml", "style");
style.innerHTML = "<foo></foo>";
will create a textnode with the text "<foo></foo>" as a child of the <style> element. Even if this is happening in an XML/XHTML document.
Per spec, I would think in an XML document this should create a child element named "foo", no?
I haven't had a chance to check what IE/Edge do here yet. /cc @annevk @smaug----
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 checking the reported innerHTML behavior for style elements created with createElementNS in XML/XHTML documents across the cited browsers. Compare those results with the applicable DOM Parsing and XML/HTML specifications, including the expected handling of the foo element. Done means the normative behavior and any required specification change are clearly determined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100