We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f5e01a commit 65c4b47Copy full SHA for 65c4b47
src/browser/browser.zig
@@ -204,7 +204,10 @@ pub const Page = struct {
204
try_catch.init(self.session.env);
205
defer try_catch.deinit();
206
207
- self.session.env.wait() catch {
+ self.session.env.wait() catch |err| {
208
+ // the js env could not be started if the document wasn't an HTML.
209
+ if (err == error.EnvNotStarted) return;
210
+
211
const alloc = self.arena.allocator();
212
if (try try_catch.err(alloc, self.session.env)) |msg| {
213
defer alloc.free(msg);
0 commit comments