eachParent

iterates through all the parent items (the immediate parent and its parent, etc until the parent is the component itself)

void eachParent(string id,function cb);

Parameters

idstringthe ID of the item
cbfunctionthe function that will be applied to every parent of the item

Example

toolbar.data.eachParent("new_btn", item => console.log(item));

Back to top