You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for some elements, elem.querySelectorAll doesn't work. When I check instantly, in function makeRef(selectors, element) at "/src/dom/selectors/nwsapi.js" and line 1328, element.classList[0] is used. element.classList is an instance of DOMTokenList and DOMTokenList extends Set, so we cannot get items as ".classList[0]". A native DOMTokenList acts as an Array so I want you to fix DOMTokenList.
I'm a Japanese student, so my sentence is so bad. I apologize.
The text was updated successfully, but these errors were encountered:
What should be a DomTokenList is not indexable in deno-dom:
constdoc=newDOMParser().parseFromString("<div class='foo bar'></div>","text/html");doc.querySelector("div").classList[0];// should return "foo" but returns undefined
The :scope pseudo-class selector is not supported:
doc.querySelector(":scope");// should return <html> element of the document, but returns null
#96 will address the first issue once it's ready for merging.
I created a new issue for the second problem: #97.
0kku
changed the title
querySelectoAll(":scope") doesn't work (classList extends Set but accessed like "classList[0]")
DOMTokenList is not indexable
May 10, 2022
As for some elements,
elem.querySelectorAll
doesn't work. When I check instantly, infunction makeRef(selectors, element)
at "/src/dom/selectors/nwsapi.js" and line 1328,element.classList[0]
is used.element.classList
is an instance ofDOMTokenList
andDOMTokenList
extendsSet
, so we cannot get items as ".classList[0]
". A nativeDOMTokenList
acts as anArray
so I want you to fix DOMTokenList.I'm a Japanese student, so my sentence is so bad. I apologize.
The text was updated successfully, but these errors were encountered: