EN
Forum

Methodology

Toolbox

Platform

JSDocSource
Instance methods:
on
once
un
emit
Object methods:
Event
Emitter
Class Event
Instance methods:
preventDefault
isDefaultPrevented
stopPropagation
isPropagationStopped
Members
type
target
data
Constructor
Class Emitter
Instance methods:
on
once
un
emit

Module events

Instance methods:

on(e, [data], fn, [ctx]):Emitter
description
Adds an event handler
parameters
e
String
Event type
data
Object
Additional data that the handler gets as e.data
fn
Function
Handler
ctx
Object
Handler context
once(e, [data], fn, [ctx]):Emitter
description
Adds a one time handler for the event. Handler is executed only the next time the event is fired, after which it is removed.
parameters
e
String
Event type
data
Object
Additional data that the handler gets as e.data
fn
Function
Handler
ctx
Object
Handler context
un([e], [fn], [ctx]):Emitter
description
Removes event handler or handlers
parameters
e
String
Event type
fn
Function
Handler
ctx
Object
Handler context
emit(e, [data]):Emitter
description
Fires event handlers
parameters
e
String, events:Event
Event
data
Object
Additional data

Object methods:

Event()
Emitter()

Class Event

Instance methods:

preventDefault()
description
Prevents default action
isDefaultPrevented():Boolean
description
Returns whether is default action prevented
stopPropagation()
description
Stops propagation
isPropagationStopped():Boolean
description
Returns whether is propagation stopped

Members

type()
description
Type
target()
description
Target
data()
description
Data

Constructor

parameters
type
String
target
Object

Class Emitter

Instance methods:

on(e, [data], fn, [ctx]):Emitter
description
Adds an event handler
parameters
e
String
Event type
data
Object
Additional data that the handler gets as e.data
fn
Function
Handler
ctx
Object
Handler context
once(e, [data], fn, [ctx]):Emitter
description
Adds a one time handler for the event. Handler is executed only the next time the event is fired, after which it is removed.
parameters
e
String
Event type
data
Object
Additional data that the handler gets as e.data
fn
Function
Handler
ctx
Object
Handler context
un([e], [fn], [ctx]):Emitter
description
Removes event handler or handlers
parameters
e
String
Event type
fn
Function
Handler
ctx
Object
Handler context
emit(e, [data]):Emitter
description
Fires event handlers
parameters
e
String, events:Event
Event
data
Object
Additional data

events__channels

Returns/destroys a named communication channel
parameters
id
String
Channel ID
drop
Boolean
Destroy the channel
returns
events:Emitter, undefined
Communication channel

events__observable

Creates new observable

Instance methods:

on(e, [data], fn, [fnCtx]):Observable
description
Adds an event handler
parameters
e
String
Event type
data
Object
Additional data that the handler gets as e.data
fn
Function
Handler
fnCtx
Object
Context
once(e, [data], fn, [fnCtx]):Observable
description
Adds an event handler
parameters
e
String
Event type
data
Object
Additional data that the handler gets as e.data
fn
Function
Handler
fnCtx
Object
Context
un([e], [fn], [fnCtx]):Observable
description
Removes event handler
parameters
e
String
Event type
fn
Function
Handler
fnCtx
Object
Context
parameters
emitter
events:Emitter
returns
Observable

events__observable_type_bem-dom

Creates new observable
parameters
bemEntity
i-bem-dom:Block, i-bem-dom:Elem, events:Emitter
returns
Observable