dart-lang / html

Dart port of html5lib. For parsing HTML/HTML5 with Dart. Works in the client and on the server.

Home Page:https://pub.dev/packages/html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Element 'picture' is never found

BugsOverBugs opened this issue · comments

commented

domDoc.querySelectorAll('#blt9495a15aac0c2092 > section > div > div > div > ul > li > div > div > a > div')
returns
[<html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>, <html div>]
and
domDoc.querySelectorAll('#blt9495a15aac0c2092 > section > div > div > div > ul > li > div > div > a > div > picture')
or
domDoc.querySelectorAll('#blt9495a15aac0c2092 > section > div > div > div > ul > li > div > div > a > div > picture > img')
should return a list of the same length, but the list is always empty.

No error is thrown.

If Itry to get the elements with
domDoc.getElementsByTagName('picture')
or
domDoc.getElementsByClassName('myClassName')
the lists are also empty.

I want to access the <img> within the <picture> to get the src by .map((e) => e.attributes["src"]).

Can anyone help me with that issue?

I'm not able to reproduce this behavior.

Can you post a complete minimal reproduction case?