mirror of https://github.com/gorhill/uBlock.git
Harden `spoof-css` scriptlet
This commit is contained in:
parent
4bd562f3c2
commit
64b849ab0b
|
@ -2897,6 +2897,17 @@ function spoofCSS(
|
||||||
}
|
}
|
||||||
return spoofStyle(prop, Reflect.get(target, prop, receiver));
|
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;
|
return proxiedStyle;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue