views:

60

answers:

2

How is it possible to create document object from html source and use document.* functions like getElementById in node.js?

A: 

Doubtful. node.js is a server-side "framework" so it would have no use for the client-side DOM.

Articles running-yui-3-server-side-with-node-js and node-js-yui-3-dom-manipulation-oh-my are interesting. According to the articles node does not have a native DOM, but he was able to use a platform-independent DOM, CommonJS.

Justin Ethier
+3  A: 

You probably want something like this, http://github.com/tmpvar/jsdom and http://developer.yahoo.com/yui/theater/video.php?v=insua-dom

meder