mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibWeb/XML: Avoid placing all elements missing an ns in the HTML ns
Also remove the hack for SVG documents, a well-formed SVG document has the correct xmlns attribute set, which should be automatically picked up by the builder now.
This commit is contained in:
parent
830f1dbbfe
commit
ebe254a6d3
4 changed files with 43 additions and 14 deletions
20
Tests/LibWeb/Text/input/XML/parser-namespace.html
Normal file
20
Tests/LibWeb/Text/input/XML/parser-namespace.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest((done) => {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.responseType = "document";
|
||||
xhr.open("GET", "data:text/xml,<?xml version='1.0'?><random xmlns=\"some.random/namespace\"><inner/></random>", true);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState !== 4 || xhr.status !== 200)
|
||||
return;
|
||||
let xml = xhr.responseXML;
|
||||
const expected = "some.random/namespace";
|
||||
if (xml.documentElement.namespaceURI == expected && xml.documentElement.childNodes[0].namespaceURI == expected)
|
||||
println("PASS");
|
||||
else
|
||||
println("FAIL");
|
||||
done();
|
||||
};
|
||||
xhr.send();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue