Events proxy object. For inter-component communications, please register your events and please subscribe to your events from the events hub. This reduces coupling between components.
Usage example:
const Events = require('core/Events');
var foo = {
    initialize: function() {
        // Register the event with the events hub.
        Events.register('mynamespaced:event', this);
    },
    action: function() {
        // Broadcast your event to the events hub.
        // The events hub will then broadcast this event to all its subscribers.
        this.trigger('mynamespaced:event');
    }
}
var bar = {
    initialize: function() {
        // Call a callback when the event is received.
        Events.on('mynamespaced:event', function() {
            alert('Event!');
        });
    }
}Methods
- 
    
<inner> on()
 - 
    
    
Wraps Backbone.Events#on to throw a warning if the event listened to is deprecated.
 - 
    
<inner> register(event, context [, options])
 - 
    
    
Registers an event with the event proxy.
Parameters:
Name Type Argument Description eventstring The name of the event. A good practice is to namespace your events with a colon. For example:
app:start.contextObject The object that will trigger the event.
optionsObject <optional> 
Optional params.
Properties
Name Type Argument Default Description deprecatedboolean <optional> 
false trueif the event is deprecated.messagestring <optional> 
The deprecation message to log. A default message will be triggered if not defined.
 - 
    
<inner> registerAjaxEvents()
 - 
    
    
Subscribes to global ajax events.
 - 
    
<inner> unregister(context [, event])
 - 
    
    
Unregisters an event from the event proxy.
Parameters:
Name Type Argument Description contextObject Source to be cleared from.
eventstring <optional> 
Name of the event to be cleared. If not specified, all events registered on
contextwill be cleared.