Domo ⎧ː̊ːːː̊⎫ v1.0
Compact micro-framework / library for web applications: Domo is not afraid of big trees!
Includes three components:
- dom: main object, contains an extended JsonML parser for concise XML/HTML DOM generation from Javascript, and element retrieval shortcuts by identifier or CSS selector.
- dom.Nexus: bidirectional binding utility to build HTML components and keep them synchronized with a model, which is just a plain Javascript object.
- dom.XPath: convenience XPath functions. This depends on the browser's XPath implementation, see https://developer.mozilla.org/en-US/docs/Web/XPath
It does not include a virtual DOM engine: I recommend using Mithril.js instead for applications where that approach fits better.
It also assumes a modern (ES5) web browser, and is distributed under the MIT license.
The minimized version dom.min.js is 3.7 KB, or 1.7 KB once compressed with GZIP.
Examples
- simple-dom.html is a simple example of HTML generation with hand-made unidirectional binding using standard event handling.
- bind.html shows the usage of Nexus components and bi-directional data binding between the model and input elements.
- dict.html
is a dictionary that uses all the features:
JsonML,
XPath
,iterateAsync
,Nexus.addListener
, etc. - html-editor.html is the simplistic HTML editor from the Nexus documentation.