mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00: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:
parent
84fe8d675b
commit
76e638b4ca
Notes:
github-actions[bot]
2024-10-31 09:59:53 +00:00
Author: https://github.com/gmta
Commit: 76e638b4ca
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2075
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 34 additions and 17 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue