mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
proxy Object.getOwnPropertyDescriptor
This commit is contained in:
parent
ac5b03736a
commit
52a5e49150
7 changed files with 45 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
import { iswindow } from "..";
|
||||
import { ScramjetClient } from "../client";
|
||||
import { getOwnPropertyDescriptorHandler } from "../helpers";
|
||||
import { nativeGetOwnPropertyDescriptor } from "../natives";
|
||||
import { unproxy } from "./unproxy";
|
||||
|
||||
const realOnEvent = Symbol.for("scramjet original onevent function");
|
||||
|
@ -138,7 +139,7 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
key.startsWith("on") &&
|
||||
handlers[key.slice(2)]
|
||||
) {
|
||||
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
||||
const descriptor = nativeGetOwnPropertyDescriptor(target, key);
|
||||
if (!descriptor.get || !descriptor.set || !descriptor.configurable)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue