Introduce PendingScript

This moves scripts' loading results in Document, instead of maintaining them
behind a DOMRefCell in each HTMLScriptElement.
This commit is contained in:
Anthony Ramine 2017-01-11 14:13:15 +01:00
parent 965370c0bf
commit 30f0553ac7
8 changed files with 193 additions and 82 deletions

View file

@ -8660,6 +8660,12 @@
"url": "/_mozilla/mozilla/navigator.html"
}
],
"mozilla/nested_asap_script.html": [
{
"path": "mozilla/nested_asap_script.html",
"url": "/_mozilla/mozilla/nested_asap_script.html"
}
],
"mozilla/node_compareDocumentPosition.html": [
{
"path": "mozilla/node_compareDocumentPosition.html",

View file

@ -0,0 +1,15 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Nested ASAP scripts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
var t = async_test("Nested ASAP scripts");
</script>
<script async src="nested_asap_script.js"></script>
</body>
</html>

View file

@ -0,0 +1,6 @@
t.step(function () {
var s = document.createElement("script");
s.setAttribute("async", "");
s.src = "data:text/javascript,t.done()";
document.body.appendChild(s);
});