mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-07-27 14:08:54 +00:00
* Fakedom: uppercase tagName for HTML elements per DOM spec Browsers uppercase tagName for HTML elements. Other namespaces (SVG, MathML, XML) preserve case. Fakedom now matches, so widget code can use the natural `node.tagName === "OPTGROUP"` form in both environments. https://dom.spec.whatwg.org/#dom-element-tagname * Tests: cover fakedom tagName spec compliance Three specs pin the DOM contract for tagName: uppercase for HTML elements, case preservation for other namespaces, and non-mutating reads. Includes the OPTGROUP predicate the select widget will rely on once it can drop its defensive .toUpperCase() call. https://dom.spec.whatwg.org/#dom-element-tagname * Fakedom: empty or null namespace creates a no-namespace element Per DOM spec, createElementNS("") and createElementNS(null) have to produce elements with no namespace. Fakedom previously defaults both to HTML, which made tagName incorrectly uppercase non-HTML elements. createElement without arguments still defaults to HTML. https://dom.spec.whatwg.org/#dom-document-createelementns * Add ChangeNote