Commit fd24a45
authored
Improve client side script
- Moved form submit handler to the global wplf object
- You weren't able to easily remove anonymous event listeners, and if you removed it the hard way, good luck adding it back.
- Now you can remove said listener like this: `form.removeEventListener('submit', window.wplf.submitHandler)`, adding works the same way.
- Print a warning message to the console only if there's no errorCallback
- Fixed indent
- improved readability (and ruined diffs as a side effect)1 parent 7027662 commit fd24a45
1 file changed
Lines changed: 41 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments