========== Substitute ========== There are some cases where a *DOM* layout tree has to be transformed into an equivalent layout using third-party controls. Method ====== .. code-block:: :emphasize-lines: 10,18 await squared.parseDocument({ element: document.body, include: ["android.substitute"], substitutableElements: [{ selector: "#navigation", tag: "com.google.android.material.tabs.TabLayout", tagChild: "com.google.android.material.tabs.TabItem", tagChildAttr: { android: { layout_height: "match_parent" } }, renderChildren: true, autoLayout: true }] }); const navigation = squared.findDocumentNode("navigation"); navigation.android("layout_height", "match_parent"); .. tip:: Use :code:`node.lockAttr(namespace, attribute)` when your changes are overriden by an extension. Inline ====== .. code-block:: html :emphasize-lines: 3,6 .. code-block:: xml :caption: Output