xmlutil icon indicating copy to clipboard operation
xmlutil copied to clipboard

NodeJS is missing DOM api.

Open lamba92 opened this issue 3 years ago • 8 comments
trafficstars

When running into NodeJS the dom API are not available. I would recommend a fallback to https://github.com/jsdom/jsdom with a separate artifact for nodejs.

lamba92 avatar Feb 04 '22 11:02 lamba92

I'm not particularly interested in nodejs (if you are using Kotlin it makes little sense to use it). The main blocker though would be that (beyond the JS ecosystem being a bit bonkers) kotlin multiplatform doesn't really support multiplatform well. If I do something I'd probably do some runtime detection magic that would allow using jsdom at runtime, but work "automagically".

pdvrieze avatar Feb 06 '22 20:02 pdvrieze

My usecase would be AWS Lambdas to cope with the cold start issue, but I understand your point. Indeed I would prefer 2 really separated target for JS which is one NodeJS and another the browser in the K/MP model to solve those evil issues.

lamba92 avatar Feb 07 '22 14:02 lamba92

@lamba92 You may be able to try native for lambda's (they are best on cold start).

pdvrieze avatar Feb 08 '22 15:02 pdvrieze

I wonder what you've ended up using for Node @lamba92. This library would suite me perfectly but the missing piece is really Node.js.

lppedd avatar Jul 03 '23 16:07 lppedd

For context @pdvrieze, I'm developing a multiplatform library that will be consumed by Eclipse plugins, VS Code plugins, and native CLIs.

lppedd avatar Jul 03 '23 16:07 lppedd