fix style proxy

This commit is contained in:
velzie 2024-10-17 21:25:55 -04:00
parent 47cdbda5bf
commit 5a8dc2db91
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820

View file

@ -50,6 +50,8 @@ export default function (client: ScramjetClient) {
return new Proxy(style, { return new Proxy(style, {
get(t, p) { get(t, p) {
const v = Reflect.get(t, p); const v = Reflect.get(t, p);
if (p in CSSStyleDeclaration.prototype) return v;
if (typeof v === "function") { if (typeof v === "function") {
return new Proxy(v, { return new Proxy(v, {
apply(target, thisArg, argArray) { apply(target, thisArg, argArray) {