Statements¶
Callback handlers may contain complex statements:
Assignment:
clicked => { some-property = 42; }
Self-assignment with +=
-=
*=
/=
clicked => { some-property += 42; }
Calling a callback
clicked => { root.some-callback(); }
Conditional statements
clicked => {
if (condition) {
foo = 42;
} else if (other-condition) {
bar = 28;
} else {
foo = 4;
}
}
Empty expression
clicked => { }
// or
clicked => { ; }