Alex Rivera | Logout

DOM implementation in pure javascript?

Asked 2012-03-14T21:47:28.080
14

Is there an implementation or emulation of the DOM which is purely javascript?

  • There is env.js, but that requires Rhino.
  • There's jsdom, but that requires Node.

Is there a solution that works in most any javascript interpreter, such as v8, without being tied to any particular interpreter or engine? That is, is there any DOM implementation in JS that without any set up or shims can be dropped into a javascript interpreter and just run?

Edit
Report

1 Answer

5

In addition to the ones you have listed, I have heard good things about dom.js. It requires limited ES6 features such as const, WeakMap, and Proxy, so it will work in V8 and SpiderMonkey (Rhino) but not JavaScriptCore, Chakra, or others.

answered 2012-03-15T19:02:15.120

Your Answer