Base

clay.core. Base

# new Base()

Source:
Mixes In:

Base class of all objects

Members

# __uid__ :number

Source:
Type:
  • number

Methods

# after(name, action, contextopt)

Source:
Mixes In:

Alias of once('after' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# before(name, action, contextopt)

Source:
Mixes In:

Alias of once('before' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# error(action, contextopt)

Source:
Mixes In:

Alias of on('error')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# has(name, action) → {boolean}

Source:
Mixes In:

If registered the event handler

Parameters:
Name Type Description
name string
action function
Returns:
Type
boolean

# off(action, contextopt)

Source:
Mixes In:

Remove event listener

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# on(name, action, contextopt)

Source:
Mixes In:

Register event handler

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# once(name, action, contextopt)

Source:
Mixes In:

Register event, event will only be triggered once and then removed

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# success(action, contextopt)

Source:
Mixes In:

Alias of on('success')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# trigger(name)

Source:
Mixes In:

Trigger event

Parameters:
Name Type Description
name string