Files
serenity/Tests/LibWeb/Text/input/DOM/Document-createElementNS-custom.html
Jelle Raaijmakers 957ee8276a LibWeb: Use right interface for custom SVG and MathML elements
The DOM spec gets overridden by both the SVG2 and MathML core specs in
that unknown elements should not inherit DOM::Element, but
SVG::SVGElement and MathML::MathMLElement respectively.

(cherry picked from commit 76e638b4ca10a91983877d6f6e7f037c1a720965)
2024-11-12 07:14:25 -05:00

14 lines
551 B
HTML

<!doctype html>
<script src="../include.js"></script>
<script>
test(() => {
const printElement = (element) => {
println(`Element nodeName: ${element.nodeName} namespaceURI: ${element.namespaceURI} __proto__: ${element.__proto__}`);
};
printElement(document.createElementNS('http://www.w3.org/1999/xhtml', 'foo'));
printElement(document.createElementNS('http://www.w3.org/2000/svg', 'foo'));
printElement(document.createElementNS('http://www.w3.org/1998/Math/MathML', 'foo'));
});
</script>