Newer
Older
minerva / Tests / LibWeb / Text / input / parse-document-from-string-in-fetch-callback.html
@minerva minerva on 13 Jul 596 bytes Initial commit
<!DOCTYPE html>
<head>
    <script src="include.js"></script>
    <link href="file://does-not-exists.css" rel="stylesheet" />
</head>
<script>
    asyncTest(done => {
        fetch("parse-document-from-string-in-fetch-callback.html")
            .then(response => {
                return response.text()
            })
            .then(text => {
                const parser = new DOMParser();
                const newDoc = parser.parseFromString(text, 'text/html');
                println(newDoc.body.innerHTML);
                done();
            });
    });
</script>
<body>hello!</body>