Represents a reference to one or more UI nodes. It can be used to invoke UI methods, get and set properties on UI nodes.
NodesRef
only saves the information needed to find nodes (such as CSS selectors), and does not actually reference a specific node.
The actual node search is only carried out when SelectorQuery.prototype.exec()
is executed.
Therefore, the node that NodesRef
reference may not actually exist. In this case, an error will be reported when exec()
is called.
Query the attributes of the selected node.
Execute the UI method of the selected node.
Query the path information from the node to the root node of the page.
NodesRef.setNativeProps()
.mdx)
Directly set the attributes of the selected node.
Obtain the position and size of the specified text
node: