API Docs for: 0.13.12
Show:

Router.class.Base Class

Methods

_addEvent

(
  • eventName
  • funct
  • scope
)
private

use .on()

Parameters:

  • eventName String

    singular or comma separated

  • funct Function
  • scope Object

_cloneListener

(
  • function
)
Function private

create a copy of the listener for each class

Parameters:

  • function Function

Returns:

Function:

fireEvent

(
  • eventName
  • args
)
Object

Fire an event on this object

Parameters:

  • eventName String

    name of the event to fire

  • args Any...

    (optional)

Returns:

Object:

eventObject

getId

() String

Returns:

String:

uniqueId

init

()

Returns:

self

off

(
  • eventName
  • callback
)
Object

remove a listener that was registered with .on()

Parameters:

  • eventName String
  • callback Function

    the function that was used when registering the event with .on()

Returns:

Object:

on

(
  • eventName
  • callback
  • scope
)
Object

register a listener to this object class, when the object fires a specific event

Parameters:

  • eventName String
  • callback Function
  • scope Object

    (optional)

Returns:

Object:

self

Example:

on("someEvent", callback)
on({
"someevent": callback,        //comma separate event names for the same callback
"someotherevent": callback1,
scope: this
})

Properties

_idPrefix

String private

autoDestroy

Boolean

controls which data will be destoryed

Default: true

classReadyEvent

String

Default: "ready"

id

String private

use Firebrick.class.Base:getId

initialConfig

Object

when calling Firebrick.create("xxx", {}); the second parameter {} (config) is stored in this property as a reference

  • in case one needs to know with what paramters the object was intialised with

Default: null

listeners

Object map

shorthand for defining class listeners so you don't have to create the init function and use this.on()

Example:

     listeners:{
            "ready": function(){},
            scope:this
        }

localEventRegistry

Object map private

event registry

mixedIn

Object private

reference for mixins that have been mixed in. works only if "mixins" is a String or array or strings

Default: : null

mixins

String | Object | String

Default: null

sName

String

use this give the class a shortname to reference Firebrick.get(sname) is also possible if this property is defined

Default: null

Events

destroy

remove class from registry