Skip to content

Instantly share code, notes, and snippets.

@ykhs
Last active December 17, 2015 12:39
Show Gist options
  • Save ykhs/5611198 to your computer and use it in GitHub Desktop.
Save ykhs/5611198 to your computer and use it in GitHub Desktop.
domParse = function(htmlString) {
var doc;
doc = document.implementation.createHTMLDocument('');
doc.body.innerHTML = htmlString;
return doc.body.firstChild;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment