When running deno_dom@v0.1.36-alpha/deno-dom-wasm.ts with deno 1.28.1 and loading the attached test.html.zip file and then attempting to access the .outerHTML property of the <html> tag with with this code:
import { DOMParser, Element } from "https://deno.land/x/deno_dom@v0.1.36-alpha/deno-dom-wasm.ts";
const doc = new DOMParser().parseFromString(await Deno.readTextFile("test.html"), "text/html");
const outerHTML = doc.querySelector("html").outerHTML;
causes this error:
error: Uncaught (in promise) RangeError: Maximum call stack size exceeded
[getNamedNodeMapAttrNamesSym](): string[] {
^
at NamedNodeMap.<anonymous> (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:371:32)
at Element.getAttributeNames (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:651:56)
at getElementAttributesString (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/utils.ts:91:35)
at Element.get outerHTML (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:570:12)
at getInnerHtmlFromNodes (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/utils.ts:47:35)
at Element.get innerHTML (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:604:12)
at Element.get outerHTML (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:592:27)
at getInnerHtmlFromNodes (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/utils.ts:47:35)
at Element.get innerHTML (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:604:12)
at Element.get outerHTML (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:592:27)
When running
deno_dom@v0.1.36-alpha/deno-dom-wasm.ts
withdeno 1.28.1
and loading the attached test.html.zip file and then attempting to access the.outerHTML
property of the<html>
tag with with this code:causes this error: