From bb26eeada6f07b80dee39a0b0f57e346f1c90159 Mon Sep 17 00:00:00 2001 From: "zhouxiao.shaw" Date: Mon, 4 Dec 2023 15:51:38 +0800 Subject: [PATCH] fix(sandbo): fix appendChild arguments --- packages/browser-vm/src/dynamicNode/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/browser-vm/src/dynamicNode/index.ts b/packages/browser-vm/src/dynamicNode/index.ts index a72aa6f78..7e28ede75 100644 --- a/packages/browser-vm/src/dynamicNode/index.ts +++ b/packages/browser-vm/src/dynamicNode/index.ts @@ -27,8 +27,9 @@ function injector(current: Function, methodName: string) { const el = methodName === 'insertAdjacentElement' ? arguments[1] : arguments[0]; + const args = [...arguments]; const sandbox = sandboxMap.get(el); - const originProcess = () => current.apply(this, arguments); + const originProcess = () => current.apply(this, args); // custom performance Element Timing API // https://web.dev/custom-metrics/#element-timing-api