Closed TramontaG closed 1 year ago
Please add code that behaves differently (e.g., x !== y
) in browsers and Node. What shows up in the console is up to Node.js and browsers's UI teams.
What you mean by code that behaves differently? The console output is not the problem, the JSDOM object itself is missing everything but Location
, logging to the console was just the way to verify that. All the other properties like querySelector
, addEventListener
, body
and everything else are undefined when I try to access via code.
Please give me an example that shows website.window.document.body === undefined
or similar. I think you'll find that prints false.
Basic info:
I'm trying to use JSDOM for a webscraper and for some reason the window.document is loaded only with the Location attribute. Nothing more
Minimal reproduction case
I've checked the result of the axios request and it contains the html in string form. It should be ok, I've already done that before with the exact same code and it worked fine.