Need help with domify?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

component
204 Stars 34 Forks 106 Commits 5 Opened issues

Description

html -> elements

Services available

!
?

Need anything else?

Contributors list

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('

Hello there

'); 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('

Hello there

', jsdom.defaultView.document);

Running tests

$ npm test

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.