Created
November 14, 2018 17:35
-
-
Save cladley/a9b2045e9ad677d1358fcdc5a8d8a1aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Its like $('<h1>hello</h1>') in jquery | |
var parseHTML = function(str) { | |
var tmp = document.implementation.createHTMLDocument(); | |
tmp.body.innerHTML = str; | |
return tmp.body.children; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment