from static method
Creates a DOMNode from dynamic parameter entry
.
entry
Can be a DOMNode, a String with HTML, a Text,
a Function or an external element.
Implementation
static SELECTElement? from(Object? entry) {
if (entry == null) return null;
if (_domHTML.isHtmlNode(entry)) {
entry = _domHTML.toDOMNode(entry);
}
if (entry is SELECTElement) return entry;
if (entry is DOMElement) {
_checkTag('select', entry);
return SELECTElement(
attributes: entry._attributes,
options: OPTIONElement.toOptions(entry.content),
commented: entry.isCommented);
}
return null;
}