lexDomTree static method
lexDomTree converts a DOM document to a simplified tree of StyledElement
s.
Implementation
static StyledElement lexDomTree(
dom.Document html,
List<String> customRenderTags,
List<String> tagsList,
NavigationDelegate? navigationDelegateForIframe,
) {
StyledElement tree = StyledElement(
name: "[Tree Root]",
children: <StyledElement>[],
node: html.documentElement,
style: Style(),
);
html.nodes.forEach((node) {
tree.children.add(_recursiveLexer(
node,
customRenderTags,
tagsList,
navigationDelegateForIframe,
));
});
return tree;
}