isDone must be run after script's deinit

This commit is contained in:
Pierre Tachoire
2025-10-15 09:47:59 +02:00
parent 2e435f5d4e
commit 41f4533bc0

View File

@@ -602,8 +602,9 @@ pub const PendingScript = struct {
return;
}
// async script can be evaluated immediately
defer self.deinit();
self.script.eval(manager.page);
self.deinit();
// asyncScriptIsDone must be run after the pending script is deinit.
manager.asyncScriptIsDone();
}