API Docs for:
Show:

Events Class

Module: Events

Events Provider.

Can function either as a standalone or a Mixin

Constructor

Events

(
  • el
)

Parameters:

  • el Element

    element to use as event target. Optional

Methods

addEvent

(
  • the
  • a
)
chainable

Defined in bin/bromine.js:290

Adds an event

Parameters:

addEvent

(
  • the
  • a
)
chainable

Adds an event

Parameters:

addEventOnce

(
  • the
  • a
)
chainable

Adds an event for one execution, then removes it

Parameters:

addEventOnce

(
  • the
  • a
)
chainable

Defined in bin/bromine.js:401

Adds an event for one execution, then removes it

Parameters:

addEvents

(
  • literal
)
chainable

Defined in bin/bromine.js:320

Helper to add multiple events at once

Parameters:

  • literal Object

    object of event types => callbacks

addEvents

(
  • literal
)
chainable

Helper to add multiple events at once

Parameters:

  • literal Object

    object of event types => callbacks

Events.createEvent

(
  • type
  • dispatcher
  • args
)
private static

Defined in bin/bromine.js:101

cross-browser function to create event object for fire method

Created object will always have following properties: - dispatcher: a reference to dispatching object (since we can't use 'this') - args: arguments passed alongside the event - object_event: a flag set to true to easily check if this is an object event or a normal DOM event.

Parameters:

Returns:

event object

Events.createEvent

(
  • type
  • dispatcher
  • args
)
private static

cross-browser function to create event object for fire method

Created object will always have following properties: - dispatcher: a reference to dispatching object (since we can't use 'this') - args: arguments passed alongside the event - object_event: a flag set to true to easily check if this is an object event or a normal DOM event.

Parameters:

Returns:

event object

Events.removeOn

(
  • type
)
String static

removes the on* prefix from event names

Parameters:

Returns:

Events.removeOn

(
  • type
)
String static

Defined in bin/bromine.js:49

removes the on* prefix from event names

Parameters:

Returns:

fireEvent

(
  • event
  • arguments
)
chainable

Defined in bin/bromine.js:339

dispatches an event

Parameters:

  • event String

    type

  • arguments Mixed

    to pass with the event

fireEvent

(
  • event
  • arguments
)
chainable

dispatches an event

Parameters:

  • event String

    type

  • arguments Mixed

    to pass with the event

fireLatchedEvent

(
  • the
  • arguments
)
chainable

Defined in bin/bromine.js:423

Fires a latched event

Parameters:

  • the String

    event type

  • arguments Mixed

    to pass with the event

fireLatchedEvent

(
  • the
  • arguments
)
chainable

Fires a latched event

Parameters:

  • the String

    event type

  • arguments Mixed

    to pass with the event

getPseudo

(
  • type
)
Object private static

Defined in bin/bromine.js:64

returns a structured data object about a type's pseudo-events

Parameters:

Returns:

Object: data

getPseudo

(
  • type
)
Object private static

returns a structured data object about a type's pseudo-events

Parameters:

Returns:

Object: data

processType

(
  • type
)
Object private static

proccesses an event type, returning a valid data object from that name

Parameters:

Returns:

Object: data

processType

(
  • type
)
Object private static

Defined in bin/bromine.js:87

proccesses an event type, returning a valid data object from that name

Parameters:

Returns:

Object: data

removeEvent

(
  • event
  • function
)
chainable

Defined in bin/bromine.js:378

removes a function from an event

Parameters:

removeEvent

(
  • event
  • function
)
chainable

removes a function from an event

Parameters: