Merge pull request #1227 from lightpanda-io/navigation-process-before-page
Some checks failed
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled

processNavigation before running page scripts
This commit is contained in:
Pierre Tachoire
2025-11-21 10:45:09 +01:00
committed by GitHub

View File

@@ -762,6 +762,9 @@ pub const Page = struct {
var self: *Page = @ptrCast(@alignCast(ctx));
self.clearTransferArena();
// We need to handle different navigation types differently.
try self.session.navigation.processNavigation(self);
switch (self.mode) {
.pre => {
// Received a response without a body like: https://httpbin.io/status/200
@@ -840,9 +843,6 @@ pub const Page = struct {
unreachable;
},
}
// We need to handle different navigation types differently.
try self.session.navigation.processNavigation(self);
}
fn pageErrorCallback(ctx: *anyopaque, err: anyerror) void {