Merge pull request #858 from lightpanda-io/callback_with_new_this

Allow JS Callback to be called with a previously-unseen this.
This commit is contained in:
Karl Seguin
2025-07-09 09:34:14 +08:00
committed by GitHub

View File

@@ -1421,7 +1421,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
const this_obj = if (@TypeOf(value) == JsObject)
value.js_obj
else
try self.js_context.valueToExistingObject(value);
(try self.js_context.zigValueToJs(value)).castTo(v8.Object);
return .{
.id = self.id,