Closed dy closed 4 years ago
I haven't looked into dom APIs much since I've mostly been focused on running ESM scripts rather than web pages.
What sort of stuff would you expect the dom to do or how would it be populated?
The main case I'd expect - running browser tests in travis. Now for that purpose I do https://github.com/spectjs/spect/blob/master/test/register.js and node -r ./test/register.js ./test/index.js
.
Tbh I don't know many browser-only packages without dom.
Would Webrun have any benefits to running browser tests compared to regular JSDOM based test runners?
I was modelling the structure a bit closer to deno, or cloudflare workers which don't seem to provide a DOM API either.
Would an example of loading JSDOM in Webrun help for the testing use case?
regular JSDOM based test runners
Tbh I don't know (many) jsdom-based test runners, that's why the setup.
I think I don't realize completely the project's goal:
If 2 or 3 is the case - then no need for jsdom and other browser API, or that can be hidden by flags.
Yeah, I think I've been leaning mostly towards 3.
The main idea I had was to create reusable libraries that are browser-first and having a browser-like environment to run them. Mostly focusing on ESM modules and APIs that'd be useful in workers / WebRTC.
Ok, that's separate concern then. Thanks for the explanation.
Just curious, is DOM planned to be supported? browser-env for example takes it as a base. The drawback of jsdom is missing support for web-components and ranges.