1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Fix spoof-css for Firefox

This commit is contained in:
Raymond Hill 2023-05-24 16:50:34 -04:00
parent 005a0fe95d
commit 796ebc2444
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -2261,6 +2261,11 @@ function spoofCSS(
const proxiedStyle = new Proxy(style, {
get(target, prop, receiver) {
if ( typeof target[prop] === 'function' ) {
if ( prop === 'getPropertyValue' ) {
return (function(prop) {
return spoofStyle(prop, target[prop]);
}).bind(target);
}
return target[prop].bind(target);
}
return spoofStyle(prop, Reflect.get(target, prop, receiver));