Allow JS Callback to be called with a previously-unseen this.

This commit is contained in:
Karl Seguin
2025-07-08 19:17:59 +08:00
parent 2a5c7d139f
commit 29ac13185c

View File

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