-
-
Save tai2/15b8c372298a9843b534b11b9de91aed 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
import { | |
DOMParser, | |
Element, | |
} from "https://deno.land/x/deno_dom/deno-dom-wasm.ts"; | |
const doc = new DOMParser().parseFromString( | |
` | |
<h1>Hello World!</h1> | |
<p>Hello from <a href="https://deno.land/">Deno!</a></p> | |
`, | |
"text/html" | |
)!; | |
//console.log(doc.body); | |
const doc2 = doc.cloneNode(true); | |
console.log(doc2.body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment