Skip to content

Commit

Permalink
First pass at updated callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Jul 22, 2020
1 parent f68cec7 commit 5e813bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
if ( 'function' === typeof document.addEventListener ) {
for ( formEventCallback in formEventCallbacks ) {
document.addEventListener( formEventCallback, function( event ) {
if ( event.detail ) {
formEventCallbacks[ formEventCallback ].call( this, event.detail );
if ( event.type in formEventCallbacks ) {
formEventCallbacks[ event.type ].call( event, event.detail );
}
} );
}
Expand Down

0 comments on commit 5e813bc

Please sign in to comment.