I ended up using
if ( !component.isConcrete() ) return;
code in the parent component helper.
So my parent component looks like this
<aura:component extensible="true">
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="importantAttribute" type="Object"/>
<aura:handler name="change" value="{!v.importantAttribute}" action="{!c.myAction}"/>
</aura:component>
my parent component controller
({
doInit: function(component, event, helper) {
// do a lot of stuff and set importantAttribute
},
myAction: function(component, event, helper) {
helper.callImportantMethod(component);
}
})
my parent component helper
({
callImportantMethod: function(component) {
if ( !component.isConcrete() ) return;
// Execute Important logic in parent
}, //other important methods
})
So my child component looks like this
<aura:component extends="c:ParentComponent">
<aura:handler name="change" value="{!v.importantAttribute}" action="{!c.myAction}"/>
</aura:component>
my child component controller
({
myAction: function(component, event, helper) {
helper.callImportantMethod(component);
}
})
my child component helper
({
callImportantMethod: function(component) {
// Execute DIFFERENT Important logic in child
}, //other important methods
})
https://your-org.lightning.force.com/auradocs/reference.app#reference?topic=api:Component
. There is nogetDef()
method. NeithergetHelper()
method. – Martin Lezer Oct 2 '17 at 12:26getDef()
was never a documented method. However, due to Bob Buzzard article it used to be accessible – Patlatus Oct 2 '17 at 15:49