Given a string like that:
<img src="image.png" /><p>some text</p>
How can I append it to a dom node without using jQuery?
I can create something like that:
var string = '<img src="image.png" /><p>some text</p>';
var div = document.createElement('div');
div.innerHTML = string;
and then append it to a node using appendChild, but how can I add only the original string without the wrapping div?
Something like jquery's parseHTML, I need something that parses a string and return it as html nodes.