Closed kouts closed 7 years ago
Wondering if a full context
would convey the idea better. Not a fan of abbreviations, but that's just me. :D
🎉
@fskreuz thanks, can you also check if this is correct: https://ractive.js.org/concepts/#event-context
The context object is a special instance of a context object augmented with additional event-related properties where applicable.
Should this also change to context? https://ractive.js.org/concepts/#stopping-propagation
this.on('ancestorbuttonclick', event => {
console.log('This will not run')
})
this.on('descendantbuttonclick', event => {
console.log('This will run')
return false;
})
As far as I know, yes. All events, DOM or component, now supply an instance of Context
when using ractive.on
to listen for them. As a quick sanity check, I'll pull @evs-chris into the conversation. 😄
@fskreuz I know that, I meant if it's syntactically correct to say:
The context object is a special instance of a context object
Ahh... no. That's confusing. 😄 Maybe "the first argument".
@fskreuz could you also please check the example at https://ractive.js.org/concepts/#stopping-propagation I think this also needs changing from event to context am I correct?
Change the first argument from event to ctx, as first argument of event handlers is a context object (ctx)