Reputation: 151146
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
Reputation: 17720
There are DOM and DOM-like implementations for node.js, including:
Disclaimer: I haven't ever used any of them.
Upvotes: 1