1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 13:54:58 +00:00
serenity/Tests/LibWeb/Text/input/XML/parser-namespace.html
Ali Mohammad Pur ebe254a6d3 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.
2023-10-07 20:02:10 +02:00

20 lines
780 B
HTML

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