We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd2703d commit 3128de6Copy full SHA for 3128de6
NativeScript/runtime/PromiseProxy.cpp
@@ -72,6 +72,27 @@ void PromiseProxy::Init(v8::Local<v8::Context> context) {
72
});
73
}
74
75
+ globalThis = new Proxy(globalThis, {
76
+ defineProperty: (target, prop, descriptor) => {
77
+ if (prop === 'Promise') {
78
+ return true;
79
+ }
80
+ return Object.defineProperty(target, prop, descriptor);
81
+ },
82
+ set: (target, prop, value, receiver) => {
83
84
85
86
+
87
+ const descriptor = Object.getOwnPropertyDescriptor(target, prop);
88
+ if (descriptor && !descriptor.writable) {
89
+ return false;
90
91
92
+ target[prop] = value;
93
94
95
+ });
96
})();
97
)";
98
0 commit comments