mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
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.
This commit is contained in:
committed by
Tim Ledbetter
parent
84fe8d675b
commit
76e638b4ca
Notes:
github-actions[bot]
2024-10-31 09:59:53 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/76e638b4ca1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2075 Reviewed-by: https://github.com/tcl3 ✅
@@ -0,0 +1,13 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user