ladybird/Tests/LibWeb/Text/input/DOM/Document-createElementNS-custom.html
Jelle Raaijmakers 76e638b4ca 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.
2024-10-31 09:58:59 +00:00

13 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>