Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Events
Event-driven programming is used in many languages and
frameworks, such as JavaScript and Java Swing. The idea is that you
write handlers that respond to interface events as they occur.
A component registers that it may fire an event in its markup. Events are fired from JavaScript controller actions that are typically triggered by a user interacting with the user interface.
There are two types of events in the framework:
- Component events are handled by the component itself or a component that instantiates or contains the component.
- Application events are handled by all components that are listening to the event. These events are essentially a traditional publish-subscribe model.
You write the handlers in JavaScript controller actions.