We need more features for NodeJS #31
Replies: 15 comments 3 replies
-
Ok, first thing first what doesn't work on node.js without JSDom, do they rely on document/window/dom and can't be used without them and does JSDom make these features work in node.js? Would these features be widely used and should be able to use these features without installing JSDom? |
Beta Was this translation helpful? Give feedback.
-
Lots of functions, like parseHTML, fetch, formData and many others, just search for
Yes. To my knowledge JSDom allows everything that client-side JS does.
I don't know. As Bijou.js is still in the early stages it's quite possible that these would be used widely or not. Some things (Like a |
Beta Was this translation helpful? Give feedback.
-
Ok, here is what won't work in node and these need the document element
Really? Have you tried the above list using JSDom?
Fair point, this makes sense. |
Beta Was this translation helpful? Give feedback.
-
No, I assuming. |
Beta Was this translation helpful? Give feedback.
-
Makes enough sense, and most of these would be useless for node.js |
Beta Was this translation helpful? Give feedback.
-
@wgyt Also note that |
Beta Was this translation helpful? Give feedback.
-
Oh really? What does highlightel do? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
oh ok makes sense |
Beta Was this translation helpful? Give feedback.
-
Take a look at https://github.com/TheColaber/Text2HTML it parses HTML without using dom parsers or innerHTML. It's useful if you're trying to submit a chrome extension or something that disallows innerHTML and dom parsers. |
Beta Was this translation helpful? Give feedback.
-
Here's an idea: add a dependency of jsdom. |
Beta Was this translation helpful? Give feedback.
-
@Explosion-Scratch said:
|
Beta Was this translation helpful? Give feedback.
-
Yeah, JSDom would enable some features that we have in vanilla JS, but so many would just be totally useless in NodeJS, like |
Beta Was this translation helpful? Give feedback.
-
hmmmmmmm |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Currently a lot of the features of Bijou.js rely on DOM/window/document elements. This means that only about half of functions work in NodeJS. Even though I suggest in the error thrown to use JSDom I don't want to make this dependent on it. This means that we need new ideas! What snippets do people use frequently in Node? Comment below anything that you use/think is helpful! Thanks in advance!
--Explosion--
Beta Was this translation helpful? Give feedback.
All reactions