Ok, so as eons suggested, the HTML5 engine treats screen taps as mouse clicks.
I found the below out thanks to
henkz on the IRC channel.
You can use
Input.is_mouse_button_pressed() or (in my example below) you can create an alias for the mouse button via input mapping (I labelled all mouse buttons 'SCREEN_TAP')
Event driven mode:
if ((event.type == InputEvent.MOUSE_BUTTON) and (event.pressed == true)):
For event driven mode I added the
event.pressed == true criteria to prevent it counting each tap as two clicks (pressing is 1 click, releasing is another).
One side-effect of running in a browser is that if you tap too quickly the browser sometimes (not always) interprets it as a double-tap zoom command.
Additionally, holding the tap for an extended time can sometimes timeout after a few seconds, which might be an issue depending on the type of game you want to make.
I've tested this on Android 6.0.1 (Chrome 54.0.2840.85 and Opera 37.0.2192) and iPhone 6S Safari on iOS 10.1.1