attachFutureElement method

  1. @override
void attachFutureElement(
  1. DOMElement? domParent,
  2. UINode? parent,
  3. DOMNode domElement,
  4. UINode? templateElement,
  5. Object? futureElementResolved,
  6. DOMTreeMap<UINode> treeMap,
  7. DOMContext<UINode>? context,
)
override

Implementation

@override
void attachFutureElement(
    DOMElement? domParent,
    UINode? parent,
    DOMNode domElement,
    UINode? templateElement,
    futureElementResolved,
    DOMTreeMap<UINode> treeMap,
    DOMContext<UINode>? context) {
  super.attachFutureElement(domParent, parent, domElement, templateElement,
      futureElementResolved, treeMap, context);

  if (futureElementResolved is UIElement) {
    UIComponent? parentComponent;

    if (context is UIComponentDOMContext) {
      parentComponent = context.uiComponent;
    } else {
      parentComponent =
          UIRoot.getInstance()!.findUIComponentByChild(futureElementResolved);
    }

    if (parentComponent != null) {
      parentComponent.componentInternals
          .parseAttributes([futureElementResolved]);
      parentComponent.componentInternals
          .ensureAllRendered([futureElementResolved]);

      _resolveParentUIComponent(
          parentComponent.content, futureElementResolved,
          parentUIComponent: parentComponent);
    }
  }
}