Add an event when you want to provide information about actions that happen in the widget to the site owner. For example, when a customer adds a product to the cart.
To add a new event:
3. Name your event and provide a description.
4. Fire the event from your widget code.
Use this syntax:
Define the condition for firing the event and, optionally, send event data. For example:
5. You can catch your event from two places
Make sure to document your widget API by describing any property, event or function you add to it. These descriptions are available to Wix users who install your widget.