File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -243,8 +243,6 @@ pub fn pageNavigated(bc: anytype, event: *const Notification.PageNavigated) !voi
243243 const target_id = bc .target_id orelse unreachable ;
244244 const session_id = bc .session_id orelse unreachable ;
245245
246- try cdp .sendEvent ("DOM.documentUpdated" , null , .{ .session_id = session_id });
247-
248246 // frameNavigated event
249247 try cdp .sendEvent ("Page.frameNavigated" , .{
250248 .type = "Navigation" ,
@@ -257,6 +255,11 @@ pub fn pageNavigated(bc: anytype, event: *const Notification.PageNavigated) !voi
257255 },
258256 }, .{ .session_id = session_id });
259257
258+ // The DOM.documentUpdated event must be send after the frameNavigated one.
259+ // chromedp client expects to receive the events is this order.
260+ // see https://github.com/chromedp/chromedp/issues/1558
261+ try cdp .sendEvent ("DOM.documentUpdated" , null , .{ .session_id = session_id });
262+
260263 // domContentEventFired event
261264 // TODO: partially hard coded
262265 try cdp .sendEvent (
You can’t perform that action at this time.
0 commit comments