mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
fix un proxy jank
This commit is contained in:
parent
98422f736d
commit
0fef6e8853
3 changed files with 18 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
|||
import { iswindow } from "..";
|
||||
import { ScramjetClient } from "../client";
|
||||
import { unproxy } from "./unproxy";
|
||||
|
||||
const realOnEvent = Symbol.for("scramjet original onevent function");
|
||||
|
||||
|
@ -45,6 +46,7 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
|
||||
client.Proxy("EventTarget.prototype.addEventListener", {
|
||||
apply(ctx) {
|
||||
unproxy(ctx, client);
|
||||
if (typeof ctx.args[1] === "object")
|
||||
ctx.args[1] = wraplistener(ctx.args[1]);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue