#49 : Add tappable event handlers
This commit is contained in:
15
src/actions/tappable/event.js
Normal file
15
src/actions/tappable/event.js
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user