JS API Actions

How to use JS actions to hook into the plugin behavior