1

Sometimes when doing DOM scripting and experiments, we can use a web page, have some HTML, and do our DOM traversal using JavaScript, and run the code in a browser.

But if we use NodeJS, can we do the same? (The missing part is how to create a DOM tree and be able to do document.getElementById() and so forth?)

nonopolarity
  • 146,324
  • 131
  • 460
  • 740
  • related to this http://stackoverflow.com/questions/6657216/why-doesnt-node-js-have-a-native-dom? – zangw Jan 16 '16 at 01:27

1 Answers1

1

There are DOM and DOM-like implementations for node.js, including:

Disclaimer: I haven't ever used any of them.

jcaron
  • 17,302
  • 6
  • 32
  • 46