You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constaxios=require("axios");const{JSDOM}=jsdom;constchannels=require('worker_threads');asyncfunctionmain(){r=awaitaxios.get("https://patrickhlauke.github.io/recaptcha/");if(r.error){console.log("Eror occured - ",r.error)}else{constdom=newJSDOM(r.data,{url: "https://patrickhlauke.github.io/recaptcha/",contentType: "text/html",includeNodeLocations: true,runScripts: "dangerously",pretendToBeVisual: true,resources: "usable",beforeParse(window){window.MessageChannel=channels.MessageChannel;}});console.log(dom.window.document);}}// Expected -> 'dom.window.document result'// Actual ---> '(node:68114) UnhandledPromiseRejectionWarning: ReferenceError: MessageChannel is not defined'
How does similar code behave in browsers?
The result from dom.window.document (I didn't add a link to anything here since I assume everyone reading this knows, to some degree, the result of the above code.
The text was updated successfully, but these errors were encountered:
Basic info:
Minimal reproduction case
How does similar code behave in browsers?
The result from dom.window.document (I didn't add a link to anything here since I assume everyone reading this knows, to some degree, the result of the above code.
The text was updated successfully, but these errors were encountered: