mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
chore: format
This commit is contained in:
parent
260c78d684
commit
e5a0843b5f
1 changed files with 4 additions and 0 deletions
|
@ -35,6 +35,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
|
|
||||||
if (value instanceof Attr) {
|
if (value instanceof Attr) {
|
||||||
let attr = value;
|
let attr = value;
|
||||||
|
|
||||||
return new Proxy(attr, {
|
return new Proxy(attr, {
|
||||||
get(target, prop) {
|
get(target, prop) {
|
||||||
if (
|
if (
|
||||||
|
@ -45,6 +46,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
// we're using the proxied getAttribute here
|
// we're using the proxied getAttribute here
|
||||||
return target.ownerElement.getAttribute(target.name);
|
return target.ownerElement.getAttribute(target.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Reflect.get(target, prop);
|
return Reflect.get(target, prop);
|
||||||
},
|
},
|
||||||
set(target, prop, value) {
|
set(target, prop, value) {
|
||||||
|
@ -54,8 +56,10 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
prop === "textContent"
|
prop === "textContent"
|
||||||
) {
|
) {
|
||||||
target.ownerElement.setAttribute(target.name, value);
|
target.ownerElement.setAttribute(target.name, value);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Reflect.set(target, prop, value);
|
return Reflect.set(target, prop, value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue