html2dom

Covert html string to DOM node


License
MIT
Install
bower install html2dom

Documentation

html2dom

Covert html string to DOM node, support node which must be used in special context(thead, param, ...).

Case

	var node = html2dom('<td><span>123</span></td>');
	node.tagName; 	// 'td'
	node.innerHTML; // '<span>123</span>'

	var nodes = html2dom('<div>1</div><p>2</p>');
	nodes.length; 	// 2
	nodes[1].tagName; // 'p'

Test

Using karma as test runner, jasmine for test case.

Prepare for test:

npm install

To test:

npm test