From e8879cd6db4d692ca0ab9c81cde305a740792136 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 15 Jan 2024 18:20:45 +0100 Subject: [PATCH] browser: add TODO for concurrency --- src/browser/browser.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/browser/browser.zig b/src/browser/browser.zig index e5c86c77..369bf76b 100644 --- a/src/browser/browser.zig +++ b/src/browser/browser.zig @@ -223,6 +223,7 @@ pub const Page = struct { // https://html.spec.whatwg.org/#read-html // start JS env + // TODO load the js env concurrently with the HTML parsing. log.debug("start js env", .{}); try self.env.start(self.alloc); @@ -233,6 +234,9 @@ pub const Page = struct { try self.env.addObject(html_doc, "document"); // browse the DOM tree to retrieve scripts + // TODO execute the synchronous scripts during the HTL parsing. + // TODO fetch the script resources concurrently but execute them in the + // declaration order for synchronous ones. // sasync stores scripts which can be run asynchronously. // for now they are just run after the non-async one in order to