Package Exports
- virtual-html
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (virtual-html) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
virtual-html
Convert given HTML into Virtual DOM object
Install
$ npm install virtual-html
Usage
var html = '<div class="foo bar" style="color: red; background: yellow;">yo</div>';
var virtual = require('virtual-html')
var tree
virtual(html, function (error, dom) {
if (error) throw error
dom.tagName
// => 'div'
dom.children[0].text
// => 'yo'
})