new Signal( host, name )

Descripción

A signal that can be raised on an object. When you deploy the Signalable mixin, it
creates instances of these for you.

Parámetros
Nombre Tipo Atributos Descripción
host object <nullable>

If hosted, you can identify the host here.

name string <nullable>

The name of the signal

Métodos


<private> destroy()

Descripción

Cleans up

Detalles

on( listener, listenerContext, priority ) → {SignalBinding}

Descripción

Ties a listener to a signal.

Parámetros
Nombre Tipo Atributos Descripción
listener function

The function to call when the signal is raised

listenerContext object <nullable>

A context to set for the listener. The event host may set a default for this value, but you may override that here.

priority number <nullable>

A priority for the listener.

Returns
Detalles

once( listener, listenerContext, priority ) → {SignalBinding}

Descripción

Ties a listener to for a signal for one execution.

Parámetros
Nombre Tipo Atributos Descripción
listener function

The function to call when the signal is raised

listenerContext object <nullable>

A context to set for the listener. The event host may set a default for this value, but you may override that here.

priority number <nullable>

A priority for the listener.

Returns
Detalles

off( listener, listenerContext ) → {function}

Descripción

Unbinds a listener to a signal.

Parámetros
Nombre Tipo Atributos Descripción
listener function

The function to unbind

listenerContext object <nullable>

The context that was bound

Returns
Detalles

has( listener, listenerContext ) → {boolean}

Descripción

Check if listener was attached to Signal.

Parámetros
Nombre Tipo Atributos Descripción
listener function

The function to check

listenerContext object <nullable>

The context that was bound

Returns
Detalles

toString()

Descripción

Strings!

Detalles