Skip to content

ability.Triggerable

Gary Soedarsono edited this page Feb 2, 2015 · 14 revisions

ability.Triggerable

extends: [[ability.Ability|ability.Ability]]

Provides triggers to abilities supported by the app. Normally you don't need to register this to the app. ability.Abilities should do this for you.

To use this class, add the trigger as an attribute name, and the name of the ability as its value.

Supported triggers:

  • pb-click: Triggers when the element is clicked.
  • pb-dblclick: Triggers when the element is double clicked.
new ability.Triggerable()

Attributes

pb-click Triggers when the element is clicked.
pb-dblclick Triggers when the element is double clicked.

Properties

name string readonly The name of the ability. This is used as an ID to refer to the registered abilities.

Methods

setDefaultValue

setDefaultValue(!Element el)

Sets the default value of the given element.

el !Element The element whose default value should be set.

attributeChangedCallback

attributeChangedCallback(!Element el, String name, String oldValue, String newValue)

Handles attribute change.

el !Element The element whose attribute was changed.
name String Name of the attribute that was changed.
oldValue String Old value of the changed attribute.
newValue String New value of the changed attribute.

attachedCallback

attachedCallback(!Element el)

Called when the element is attached to the document.

el !Element The element that was attached.

detachedCallback

detachedCallback(!Element el)

Called when the element is detached from the document.

el !Element The element that was detached.

Clone this wiki locally