browser: dispatch window.load event

This commit is contained in:
Pierre Tachoire
2024-02-12 12:12:13 +01:00
parent 951bf4b501
commit 5619ed020c

View File

@@ -329,6 +329,11 @@ pub const Page = struct {
// TODO wait for async scripts // TODO wait for async scripts
// TODO set document.readyState to complete // TODO set document.readyState to complete
// dispatch window.load event
const loadevt = try parser.eventCreate();
try parser.eventInit(loadevt, "load", .{});
_ = try parser.eventTargetDispatchEvent(parser.toEventTarget(Window, &self.session.window), loadevt);
} }
// evalScript evaluates the src in priority. // evalScript evaluates the src in priority.