#49 : Add tappable event handlers

This commit is contained in:
Vadim
2021-07-24 16:16:23 +03:00
parent da7d8ac705
commit e837e09789
5 changed files with 58 additions and 6 deletions

View File

@@ -0,0 +1,15 @@
// tap start event
export function addFocusinEventListener(source, cb) {
source.addEventListener('touchstart', cb)
}
export function removeFocusinEventListener(source, cb) {
source.removeEventListener('touchstart', cb)
}
// tap end event
export function addFocusoutEventListener(source, cb) {
source.addEventListener('touchend', cb)
}
export function removeFocusoutEventListener(source, cb) {
source.removeEventListener('touchend', cb)
}