There is a bug when parsing html with templates, where the document fragment content gets lost.
How to reproduce
Run the following code in the browser and deno (uncomment import).
// import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.37/deno-dom-wasm.ts";
const source = `<head></head><body><template><p>Hello world</p></template></body>`
const element = new DOMParser().parseFromString(source,"text/html").documentElement
const html = element.innerHTML
console.assert(source === html)
// html in browser: <head></head><body><template><p>Hello world</p></template></body>
// html in deno-dom: <head></head><body><template></template></body>
received result
The assertion will pass in the browser but not with deno_dom@v0.1.37/deno-dom-wasm.ts.
expected result
deno-dom-wasm should behave the same as in the browser.
There is a bug when parsing html with templates, where the document fragment content gets lost.
How to reproduce Run the following code in the browser and deno (uncomment import).
received result The assertion will pass in the browser but not with deno_dom@v0.1.37/deno-dom-wasm.ts.
expected result deno-dom-wasm should behave the same as in the browser.