mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +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();
|
return value.js_obj.toValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (T == Value) {
|
||||||
|
return value.value;
|
||||||
|
}
|
||||||
|
|
||||||
if (T == Promise) {
|
if (T == Promise) {
|
||||||
// we're returning a v8.Promise
|
// we're returning a v8.Promise
|
||||||
return value.promise.toObject().toValue();
|
return value.promise.toObject().toValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user