html -> elements
JavaScript Makefile
Latest commit 492391f Mar 11, 2016 @stephenmathieson stephenmathieson Merge pull request #44 from taitulism/patch-1
add MIT license file
Failed to load latest commit information.
test add support for <g> svg elements Mar 10, 2015
.gitignore ignore the build files Jan 5, 2014
.gitmodules Initial commit Jun 11, 2012
History.md Release 1.4.0 Jul 15, 2015
LICENSE - MIT add MIT license file Mar 11, 2016
Makefile Makefile: .PHONY: build Nov 5, 2013
Readme.md Update usage example Apr 28, 2015
component.json Release 1.4.0 Jul 15, 2015
index.js Fix typo Apr 28, 2015
package.json Release 1.4.0 Jul 15, 2015

Readme.md

domify

Turn HTML into DOM elements x-browser.

Usage

Works out of the box in the browser:

var domify = require('domify');

document.addEventListener('DOMContentLoaded', function() {
  var el = domify('<p>Hello <em>there</em></p>');
  document.body.appendChild(el);
});

You can also run it in node and iojs. Just pass a custom implementation of document:

var jsdom = require('jsdom').jsdom();

domify('<p>Hello <em>there</em></p>', jsdom.defaultView.document);

Running tests

$ npm i -g component-test
$ make
$ component-test browser

License

MIT