parseLayoutElement function
Implementation
LayoutElement parseLayoutElement(dom.Element element,
List<StyledElement> children,) {
switch (element.localName) {
case "details":
if (children.isEmpty) {
return EmptyLayoutElement(name: "empty");
}
return DetailsContentElement(
node: element,
name: element.localName!,
children: children,
elementList: element.children,
);
case "thead":
case "tbody":
case "tfoot":
return TableSectionLayoutElement(
name: element.localName!,
children: children,
);
case "tr":
return TableRowLayoutElement(
name: element.localName!,
children: children,
node: element,
);
default:
return EmptyLayoutElement(name: "[[No Name]]");
}
}