onpublic
The on
extension of Javascript's Function prototype is available when EmberENV.EXTEND_PROTOTYPES
or EmberENV.EXTEND_PROTOTYPES.Function
is true, which is the default.
You can listen for events simply by adding the on
call to the end of your method declarations in classes or mixins that you write. For example:
Ember.Mixin.create({ doSomethingWithElement: function() { // Executes whenever the "didInsertElement" event fires }.on('didInsertElement') });
See Ember.on
.
Please login to continue.