We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.43+76800b049
Linux 6.9.3-76060903-generic x86_64 x86_64
When asking happy-dom to eval a script, it fails to do so.
It fails with the following error: TypeError: this[PropertySymbol.window].eval is not a function:
TypeError: this[PropertySymbol.window].eval is not a function
I've written a reproducible example of the error at https://github.com/canadaduane/happy-dom-eval-issue
Bun should evaluate the script module offered in the happy-dom script tag. When running with node 23.2.0, the repro prints "hello world" as expected.
$ bun happy-test.js 274 | if (browserSettings.disableErrorCapturing || 275 | browserSettings.errorCapture !== BrowserErrorCaptureEnum.tryAndCatch) { 276 | this[PropertySymbol.window].eval(code); 277 | } 278 | else { 279 | WindowErrorUtility.captureError(this[PropertySymbol.window], () => this[PropertySymbol.window].eval(code)); ^ TypeError: this[PropertySymbol.window].eval is not a function. (In 'this[PropertySymbol.window].eval(code)', 'this[PropertySymbol.window].eval' is undefined) at <anonymous> (/home/duane/Projects/elsync/node_modules/.pnpm/happy-dom@16.5.3/node_modules/happy-dom/lib/nodes/html-script-element/HTMLScriptElement.js:279:112) at captureError (/home/duane/Projects/elsync/node_modules/.pnpm/happy-dom@16.5.3/node_modules/happy-dom/lib/window/WindowErrorUtility.js:21:22) at <anonymous> (/home/duane/Projects/elsync/node_modules/.pnpm/happy-dom@16.5.3/node_modules/happy-dom/lib/nodes/html-script-element/HTMLScriptElement.js:279:36)
No response
The text was updated successfully, but these errors were encountered:
minimum reproduction:
import * as vm from 'node:vm'; class A { globalThis = this; constructor() { vm.createContext(this); new vm.Script('this.eval = globalThis.eval').runInContext(this); } } console.log(new A()); expect(new A().eval).toBe(eval);
Sorry, something went wrong.
No branches or pull requests
What version of Bun is running?
1.1.43+76800b049
What platform is your computer?
Linux 6.9.3-76060903-generic x86_64 x86_64
What steps can reproduce the bug?
When asking happy-dom to eval a script, it fails to do so.
It fails with the following error:
TypeError: this[PropertySymbol.window].eval is not a function
:I've written a reproducible example of the error at https://github.com/canadaduane/happy-dom-eval-issue
What is the expected behavior?
Bun should evaluate the script module offered in the happy-dom script tag. When running with node 23.2.0, the repro prints "hello world" as expected.
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: