firstchild¶
-
guerilla.
firstchild
(node, type, pattern='', recursive=False)¶ Find the first child in a node that match the search parameters
The firstchild function is written as:LUA{ function firstchild (...)
- for child in
children
(...) do - return child
end
end }
param node: The node to search into type node: Node
param type: A class or list of classes the child must belong to type type: str or {string} param pattern: A Lua’s pattern used to check the name of the node, or a function that filter the node. See Lua’s pattern documentation. type pattern: str or function param recursive: if true, traverse the whole parent hierarchy. type recursive: bool return: The first child found or None if none matches rtype: Node
or None- for child in