mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibWeb: Make XHR.response an actual XMLDocument for XML documents
Before this change, we were producing a generic DOM::Document, which was not distinguishable from an XMLDocument by IDL interface type.
This commit is contained in:
parent
2b343c9508
commit
0762388709
5 changed files with 29 additions and 2 deletions
|
@ -0,0 +1,19 @@
|
|||
<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'?><lol/>", true);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
let xml = xhr.responseXML;
|
||||
if (xml instanceof XMLDocument)
|
||||
println("PASS");
|
||||
else
|
||||
println("FAIL");
|
||||
done();
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue