nonopolarity
nonopolarity

Reputation: 151146

Using Node.js, given some HTML, can a DOM tree be created?

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?)

Upvotes: 1

Views: 661

Answers (1)

jcaron
jcaron

Reputation: 17720

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

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

Upvotes: 1

Related Questions