When using deno_dom@v0.1.36-alpha/deno-dom-wasm.ts with deno 1.28.1 and loading the attached welcome.zip file with this code:
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.36-alpha/deno-dom-wasm.ts";
new DOMParser().parseFromString(await Deno.readTextFile("welcome.html"), "text/html");
causes this error:
error: Uncaught (in promise) TypeError: this[#attrNodeCache][attribute][setAttrValueSym] is not a function
this.#attrNodeCache[attribute]![setAttrValueSym](value);
^
at NamedNodeMap.<anonymous> (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:399:55)
at Element.setAttribute (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:661:45)
at new Element (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/element.ts:523:12)
at nodeFromArray (https://deno.land/x/deno_dom@v0.1.36-alpha/src/deserialize.ts:48:15)
at nodeFromArray (https://deno.land/x/deno_dom@v0.1.36-alpha/src/deserialize.ts:68:9)
at nodeFromArray (https://deno.land/x/deno_dom@v0.1.36-alpha/src/deserialize.ts:68:9)
at nodesFromString (https://deno.land/x/deno_dom@v0.1.36-alpha/src/deserialize.ts:11:16)
at DOMParser.parseFromString (https://deno.land/x/deno_dom@v0.1.36-alpha/src/dom/dom-parser.ts:24:21)
at file:///tmp/domTest.js:2:17
The same error occurs with latest github version and also with the native variant.
When using
deno_dom@v0.1.36-alpha/deno-dom-wasm.ts
withdeno 1.28.1
and loading the attached welcome.zip file with this code:causes this error:
The same error occurs with latest github version and also with the native variant.