How dependent is Enyo on the DOM? I've been working in it a bit and am loving alot of the non-dom features, like the way events work to tie everything together. I was sorta thinking this might be good for some of my Nodejs features. I know alot of what Enyo does is generates html for insertion into the DOM, which could still be useful server-side.
Just thinking.
0 ·
Comments
I don't think the code is currently factored such as to make it particularly easy to use in a DOM-free environment. There's very little in the Enyo kernel that's dependent on the browser environment, as far as I know.
But you can't just
require('enyo')
and have it do the right thing. It should be fairly easy to make an Enyo module for Node that left out all of the DOM-dependent code. At the very least, that'd get you Enyo.kind, "published" properties, that sort of thing. I think the event-handling code would need some minor tweaking, and XHR would need a whole different code path to work with Node.js's http library.