mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-14 15:28:57 +00:00
backport run microtasks before firing onload
This commit is contained in:
@@ -422,6 +422,9 @@ pub fn documentIsComplete(self: *Page) void {
|
||||
fn _documentIsComplete(self: *Page) !void {
|
||||
self.document._ready_state = .complete;
|
||||
|
||||
self._session.browser.runMicrotasks();
|
||||
self._session.browser.runMessageLoop();
|
||||
|
||||
// dispatch window.load event
|
||||
const event = try Event.init("load", .{}, self);
|
||||
// this event is weird, it's dispatched directly on the window, but
|
||||
|
||||
Reference in New Issue
Block a user