benchmarks/scenarios/ember.js
function on() {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var func = args.pop();
    var events = args;
    func.__ember_listens__ = events;
    return func;
  }
function on() {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var func = args.pop();
    var events = args;
    func.__ember_listens__ = events;
    return func;
  }
function on ( ) { for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) { args [ _key ] = arguments [ _key ] ; } var func = args . pop ( ) ; var events = args ; func . __ember_listens__ = events ; return func ; }
Define a property as a function that should be executed when
a specified event or events are triggered.


``` javascript
var Job = Ember.Object.extend({
logCompleted: Ember.on('completed', function() {
console.log('Job completed!');
})
});

var job = Job.create();

Ember.sendEvent(job, 'completed'); // Logs 'Job completed!'
```

@method on
@for Ember
@param {String} eventNames*
@param {Function} func
@return func
@public
Define a property as a function that should be executed when a specified event or events are triggered .