EventMixin


Module hilo/event/EventMixin Requires hilo/core/Class Source EventMixin.js
EventMixin is a mixin on event related functions. Use Class.mix(target, EventMixin) to add event function onto target.

Methods

Method Defined
on(type:String, listener:Function, once:Boolean):Object
static
EventMixin
off(type:String, listener:Function):Object
static
EventMixin
fire(type:String, detail:Object):Boolean
static
EventMixin

Method Detail

[Static] fire(type:String, detail:Object):Boolean
parameters
type:String — Event type to send.
detail:Object — The detail (parameters go with the event) of Event to send.
return
Boolean — Whether Event call successfully.
[Static] off(type:String, listener:Function):Object
parameters
type:String — The type of event listener that want to remove.
listener:Function — Event listener callback function to be removed.
return
Object — The Event itself. Functions chain call supported.
[Static] on(type:String, listener:Function, once:Boolean):Object
parameters
type:String — Event type to listen.
listener:Function — Callback function of event listening.
once:Boolean — Listen on event only once and no more response after the first response?
return
Object — The Event itself. Functions chain call supported.