'Export javascript function from Wordpress plugin and import it in app.js?
I'm writing a WP Plugin for my team to allow us to initialize GravityForms and handle form submissions from the client side. I have a function , initGravityForms() in the plugin's main.js that I want to be able to call from app.js, and I would prefer to have it as a module import so that I can force type and shape of the parameters that are passed to the function. Is there any way to accomplish this? Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
