return fake serviceworkerregistration

This commit is contained in:
velzie 2024-07-21 16:20:52 -04:00
parent 91dc2f96cd
commit f2fe8c1d5e
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
5 changed files with 87 additions and 2 deletions

View file

@ -45,6 +45,14 @@ export const windowProxy = new Proxy(self, {
return Reflect.set(target, prop, newValue);
},
defineProperty(target, property, attributes) {
if (!attributes.get && !attributes.set) {
attributes.writable = true;
}
attributes.configurable = true;
return Reflect.defineProperty(target, property, attributes);
},
});
export const documentProxy = new Proxy(self.document || {}, {