ladybird/Tests/LibWeb/Text/input/XHR/XMLHttpRequest-response-is-json-number.html
2024-05-04 14:11:10 +02:00

18 lines
547 B
HTML

<script src="../include.js"></script>
<script>
asyncTest((done) => {
const xhr = new XMLHttpRequest();
xhr.responseType = "json";
xhr.onreadystatechange = async function() {
if (xhr.readyState === 4 && xhr.status === 200) {
if (xhr.response === null)
println("PASS");
else
println("FAIL");
done();
}
};
xhr.open("GET", "data:application/json,5", true);
xhr.send();
});
</script>