Actions

Action in action set represents single instruction that will be invoked in future. Inline functions or lambda expressions are too noisy to write. As you have seen in previous section, inline function or function references are valid actions as well, following used inside an anonymous object lets you perform respective actions.

Data Action

        $x.data('property','value') 
        //or
        $x.data({ property1: value1, property2: value2 })
    

Data action merges given values into data of current atom control. If you look carefully, atom-event-click points to an action set, which will be executed on click. With each click action set itself will change leading to next available value.

Scope Action (AppScope, LocalScope and Scope)

Alert Action

        $x.alert("message") // this will not display alert, but it is a callback to display an alert
    

Is Valid Action

        $x.isValid(action) // this will only execute actions if current element is valid
    

Confirm Action

        $x.confirm('are you sure message?', actions...)

Confirm action requires an array, in which first item inside array is message for confirmation and next item is an action set, action sets can have nested action sets as well.

 

Timeout Action

Window Action

Local Window Action