mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
browser: dispatch window.load event
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user