src code

instance property Component#parent

Component#parent → Container

A reference to the current parent component of this component, or null if the component is not currently placed inside any containing component.