-
Notifications
You must be signed in to change notification settings - Fork 4
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
parse doesn't work with Node.js #6
Comments
Hi! I think this makes sense. As you alluded in https://github.com/gziolo/hpq/pull/1#issuecomment-530793003, I'm curious about the impact on the browser distributed bundle (i.e. can we ensure the built code only includes the relevant code path). I was thinking about the impact on testing too, but since we basically rely on JSDOM as the "native" implementation for tests, I don't think there's anything we can / should need to do there. |
I'll figure out how to do it but it looks like doable with Rollup 👍 I'd be nice to land #5 first which updates npm dependencies. Well, maybe it will be a good idea to pin |
Yep, done. |
Awesome, thanks. I'll rebase and continue my exploration next week 👍 |
The current implementation depends on browser APIs like
createHTMLDocument
,querySelector
,querySelectorAll
. It's not possible to use this library with Node.js or React Native.It would be possible to simulate DOM using jsdom as explored in https://github.com/gziolo/hpq/pull/1.
In ReactNative, you miss some Node.js APIs so you can't use the full implementation of jsdom. That's why I tried to use the smallest possible subset of the library.
The text was updated successfully, but these errors were encountered: