Purely functional recognition of Drag and Click gestures over a W3C Pointer Event -compatible API in Scala/Scala.js