1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-22 18:32:45 +01:00

Harden spoof-css scriptlet

This commit is contained in:
Raymond Hill 2023-08-02 11:36:54 -04:00
parent 4bd562f3c2
commit 64b849ab0b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -2897,6 +2897,17 @@ function spoofCSS(
}
return spoofStyle(prop, Reflect.get(target, prop, receiver));
},
getOwnPropertyDescriptor(target, prop) {
if ( propToValueMap.has(prop) ) {
return {
configurable: true,
enumerable: true,
value: propToValueMap.get(prop),
writable: true,
};
}
return Reflect.getOwnPropertyDescriptor(target, prop);
},
});
return proxiedStyle;
},