LibWeb: Script force async flag should default to true

See:
 - http://wpt.live/html/semantics/scripting-1/the-script-element/async_001.htm
This commit is contained in:
Jamie Mansfield 2024-08-04 16:56:40 +01:00 committed by Tim Ledbetter
commit 77c41a82be
Notes: github-actions[bot] 2024-08-04 18:26:27 +00:00
3 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,2 @@
includeScript.async = false
script.async = true

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<script src="../include.js" id="include-script"></script>
<script>
test(() => {
const includeScript = document.querySelector("#include-script");
println(`includeScript.async = ${includeScript.async}`);
const script = document.createElement("script");
println(`script.async = ${script.async}`);
});
</script>

View file

@ -94,7 +94,7 @@ private:
JS::GCPtr<DOM::Document> m_preparation_time_document;
// https://html.spec.whatwg.org/multipage/scripting.html#script-force-async
bool m_force_async { false };
bool m_force_async { true };
// https://html.spec.whatwg.org/multipage/scripting.html#already-started
bool m_already_started { false };