Skip to content

Commit 2b2882c

Browse files
committed
processNavigation before running page scripts
1 parent f058cf0 commit 2b2882c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/browser/page.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,9 @@ pub const Page = struct {
762762
var self: *Page = @ptrCast(@alignCast(ctx));
763763
self.clearTransferArena();
764764

765+
// We need to handle different navigation types differently.
766+
try self.session.navigation.processNavigation(self);
767+
765768
switch (self.mode) {
766769
.pre => {
767770
// Received a response without a body like: https://httpbin.io/status/200
@@ -840,9 +843,6 @@ pub const Page = struct {
840843
unreachable;
841844
},
842845
}
843-
844-
// We need to handle different navigation types differently.
845-
try self.session.navigation.processNavigation(self);
846846
}
847847

848848
fn pageErrorCallback(ctx: *anyopaque, err: anyerror) void {

0 commit comments

Comments
 (0)