How do I create an application event in Salesforce?
Create a custom application event using the tag in a . evt resource. Events can contain attributes that can be set before the event is fired and read when the event is handled. Use type=”APPLICATION” in the tag for an application event.
What are the phases available with application events?
The framework supports capture , bubble , and default phases for the propagation of application events. The capture and bubble phases are similar to DOM handling patterns and provide an opportunity for interested components to interact with an event and potentially control the behavior for subsequent handlers.
How to fire an application event in JavaScript?
Use $A.get (“e.myNamespace:myAppEvent”) in JavaScript to get an instance of the myAppEvent event in the myNamespace namespace. The syntax to get an instance of an application event is different than the syntax to get a component event, which is cmp.getEvent (“evtName”). Use fire () to fire the event.
How to view fired events in Google Chrome?
You can use monitorEvents function. Just inspect your element ( right mouse click → Inspect on visible element or go to Elements tab in Chrome Developer Tools and select wanted element) then go to Console tab and write: Now when you move mouse over this element, focus or click it, the name of the fired event will be displayed with its data.
How do I open the browser console in Firefox?
Opening the Browser Console You can open the Browser Console in one of two ways: from the menu: select “Browser Console” from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on macOS). from the keyboard: press Ctrl + Shift + J (or Cmd + Shift + J on a Mac).
How do I enable developer tool in Firefox?
To enable it set the devtools.chrome.enabled preference to true in about:config, or set the “Enable browser chrome and add-on debugging toolboxes” (Firefox 40 and later) option in the developer tool settings. You can open the Browser Console in one of two ways: