browser: add async script comment

This commit is contained in:
Pierre Tachoire
2024-01-11 11:00:07 +01:00
parent 5d262fc026
commit fb5fd6c742

View File

@@ -237,6 +237,10 @@ pub const Page = struct {
try self.env.addObject(html_doc, "document");
// browse the DOM tree to retrieve scripts
// sasync stores scripts which can be run asynchronously.
// for now they are just run after the non-async one in order to
// dispatch DOMContentLoaded the sooner as possible.
var sasync = std.ArrayList(*parser.Element).init(self.allocator);
defer sasync.deinit();