mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 13:54:58 +00:00

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.
20 lines
780 B
HTML
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>
|