mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
browser: add async script comment
This commit is contained in:
@@ -237,6 +237,10 @@ pub const Page = struct {
|
|||||||
try self.env.addObject(html_doc, "document");
|
try self.env.addObject(html_doc, "document");
|
||||||
|
|
||||||
// browse the DOM tree to retrieve scripts
|
// 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);
|
var sasync = std.ArrayList(*parser.Element).init(self.allocator);
|
||||||
defer sasync.deinit();
|
defer sasync.deinit();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user