mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 14:43:28 +00:00
support for returning Env.Value
This commit is contained in:
@@ -2889,6 +2889,10 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
return value.js_obj.toValue();
|
||||
}
|
||||
|
||||
if (T == Value) {
|
||||
return value.value;
|
||||
}
|
||||
|
||||
if (T == Promise) {
|
||||
// we're returning a v8.Promise
|
||||
return value.promise.toObject().toValue();
|
||||
|
||||
Reference in New Issue
Block a user