DOMGenerator<T> class abstract

Basic class for DOM elements generators.

Implementers

Constructors

DOMGenerator()

Properties

domActionExecutor DOMActionExecutor<T>?
getter/setter pair
domContext DOMContext<T>?
getter/setter pair
generatedHTMLTrees List<String>
no setter
hashCode int
The hash code for this object.
no setterinherited
populateGeneratedHTMLTrees bool
getter/setter pair
registeredElementsGenerators Map<String, ElementGenerator<T>>
no setter
registeredElementsGeneratorsLength int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceResolver String Function(String url)?
Function used by resolveSource.
getter/setter pair
viewport Viewport?
no setter

Methods

addChildToElement(T? parent, T? child) bool
addExternalElementToElement(T element, Object? externalElement) List<T>?
appendElementText(T element, String? text) → T?
appendElementTextNode(T element, TextNode? textNode) → T?
attachFutureElement(DOMElement? domParent, T? parent, DOMNode domElement, T? templateElement, Object? futureElementResolved, DOMTreeMap<T> treeMap, DOMContext<T>? context) → void
build(DOMElement? domParent, T? parent, DOMNode domNode, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
buildDOMAsyncElement(DOMElement? domParent, T? parent, DOMAsync domElement, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
buildElement(DOMElement? domParent, T? parent, DOMElement domElement, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T
buildElementHTML(T element) String?
buildExternalElement(DOMElement? domParent, T? parent, ExternalElementNode domElement, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
buildNodes(DOMElement? domParent, T? parent, List<DOMNode>? domNodes, DOMTreeMap<T> treeMap, DOMContext<T>? context) List<T>
buildTemplate(DOMElement? domParent, T? parent, TemplateNode domNode, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
buildText(DOMElement? domParent, T? parent, TextNode domNode, DOMTreeMap<T> treeMap) → T?
cancelEvent(Object? event, {bool stopImmediatePropagation = false}) bool
canHandleExternalElement(Object? externalElement) bool
castToNodes(List list) List<T>
clearIgnoredAttributesEquivalence() → void
containsNode(T parent, T? node) bool
createDOMEvent(DOMTreeMap<T> treeMap, Object? event) DOMEvent?
createDOMMouseEvent(DOMTreeMap<T> treeMap, Object? event) DOMMouseEvent?
createDOMNodeRuntime(DOMTreeMap<T> treeMap, DOMNode? domNode, T node) DOMNodeRuntime<T>?
createDOMTreeMap() DOMTreeMap<T>
createElement(String? tag, [DOMElement? domElement]) → T?
createGenericDOMTreeMap() DOMTreeMap<T>
createTextNode(Object? text) → T?
createWithRegisteredElementGenerator(DOMElement? domParent, T? parent, DOMElement domElement, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
finalizeGeneratedTree(DOMTreeMap<T> treeMap) → void
generate(DOMNode root, {DOMTreeMap<T>? treeMap, T? parent, DOMContext<T>? context, bool finalizeTree = true, bool setTreeMapRoot = true}) → T?
Generates an element T using root.
generateDOMAsyncElement(DOMElement? domParent, T? parent, DOMAsync domAsync, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
generateFromHTML(String htmlRoot, {DOMTreeMap<T>? treeMap, DOMElement? domParent, T? parent, DOMContext<T>? context, bool finalizeTree = true, bool setTreeMapRoot = true}) → T?
Same as generate, but parses htmlRoot first.
generateFutureElement(DOMElement? domParent, T? parent, ExternalElementNode domElement, Future future, DOMTreeMap<T> treeMap, DOMContext<T>? context) → T?
generateMapped(DOMElement root, {T? parent, DOMContext<T>? context}) DOMTreeMap<T>
Same as generate, but returns a DOMTreeMap, that contains all mapping table fo generated elements.
generateNodes(List<DOMNode> nodes, {DOMContext<T>? context}) List<T>
generateWithRoot(DOMElement? domRoot, T? rootElement, List<DOMNode> nodes, {DOMTreeMap<T>? treeMap, T? rootParent, DOMContext<T>? context, bool finalizeTree = true, bool setTreeMapRoot = true}) → T?
Same as generate, but generates nodes inside a preexistent rootElement.
getAttribute(T element, String attrName) String?
getDOMNodeText(TextNode domNode) String
getElementAttributes(T? element) Map<String, String>?
getElementNodes(T? element) List<T>
getElementOuterHTML(T? element) String?
getElementTag(T? element) String?
getElementValue(T? element) String?
getIgnoredAttributesEquivalence() List<String>
getNodeParent(T? node) → T?
getNodeParentsUntilRoot(T? node) List<T>
getNodeText(T? node) String?
ignoreAttributeEquivalence(String attributeName) → void
isElementGeneratorTag(String? tag) bool
isElementNode(T? node) bool
isEquivalentNode(DOMNode domNode, T node) bool
isEquivalentNodeType(DOMNode domNode, T node) bool
isIgnoreAttributeEquivalence(String attributeName) bool
isNodeInDOM(T? node) bool
isTextNode(T? node) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onElementCreated(DOMTreeMap<T> treeMap, DOMNode domElement, T element, DOMContext<T>? context) → void
registerElementGenerator(ElementGenerator<T> elementGenerator) bool
registerElementGeneratorFrom(DOMGenerator<T> otherGenerator) bool
registerEventListeners(DOMTreeMap<T> treeMap, DOMElement domElement, T element, DOMContext<T>? context) → void
removeChildFromElement(T parent, T? child) bool
removeIgnoredAttributeEquivalence(String attributeName) bool
replaceChildElement(T parent, T? child1, List<T>? child2) bool
replaceElement(T? child1, List<T>? child2) bool
reset() → void
Resets instances and generated tree.
resolveActionAttribute(DOMTreeMap<T> treeMap, DOMElement domElement, T element, DOMContext<T>? context) → void
resolveFutureElement(DOMElement? domParent, T? parent, DOMNode domElement, T? templateElement, Object? futureResult, DOMTreeMap<T> treeMap, DOMContext<T>? context) Object?
resolveSource(String url) String
Resolves any source attribute.
revert(DOMTreeMap<T>? treeMap, T? node) DOMNode?
Reverts node to a DOMNode.
revertElementAttributes(T? element, Map<String, String>? attributes) Map<String, String>?
setAttribute(T element, String attrName, String? attrVal) → void
setAttributes(DOMElement domElement, T element, DOMTreeMap<T> treeMap, {bool preserveClass = false, bool preserveStyle = false}) → void
toElements(Object? elements) List<T>?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

dartHTML<T>() DOMGeneratorDartHTML<T>
normalizeTag(String? tag) String?