-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
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
[Feature] vm.isContext
#18315
Comments
The following is a quote from https://deno.land/manual@v1.26.1/node
It sounds to me like the Deno team do not plan to ever support |
|
Could you provide some context on |
Oh never mind, I found denoland/deno_core#911, which is an issue tracking support. Linking this here for future reference. |
It's a JS API proposal that's currently being worked on: https://github.com/tc39/proposal-shadowrealm Unlike most new JS APIs that Deno implements automatically because they ship in V8, this one requires some work to support in the internals of Deno. You can follow the work at denoland/deno_core#911 (although the work recently had to be rolled back in #16366 because it was blocking certain refactors; it should hopefully be relanded in a couple weeks). However, |
There is a page in the Deno documentation that states that JSDOM works with Deno, however running the example code on the site generates the same error reported by the OP. The documentation should be updated until this issue is addressed. |
https://github.com/zuisong/happy-dom-deno import { Window } from 'npm:happy-dom-deno';
const window = new Window();
const document = window.document;
document.body.innerHTML = '<div class="container"></div>';
const container = document.querySelector('.container');
const button = document.createElement('button');
container.appendChild(button);
// Outputs "<div class="container"><button></button></div>"
console.log(document.body.innerHTML); |
Here are my current findings on JSDOM https://github.com/john-griffin/deno-dom-test |
for running with @mozilla/readability I could only get it working with deno-dom-wasm. import { DOMParser } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
import { Readability } from "npm:@mozilla/readability"
const document = new DOMParser().parseFromString(
htmlString,
"text/html",
)!
const reader = new Readability(document) Would love to have happy-dom and jsdom support for readability.js support. |
Implement contextified objects in `node:vm` Fixes denoland#23186 Fixes denoland#22395 Fixes denoland#20607 Fixes denoland#18299 Fixes denoland#19395 Fixes denoland#18315 Fixes denoland#18319 Fixes denoland#23183
Is your feature request related to a problem? Please describe.
I can't get
jsdom
to work.Describe the solution you'd like
Implement
vm.isContext
(and probablyvm.createContext
)Describe alternatives you've considered
https://deno.land/manual@v1.25.3/jsx_dom/linkedom
https://deno.land/manual@v1.25.3/jsx_dom/deno_dom
The text was updated successfully, but these errors were encountered: