
    // there are cross-browser issues, and this way we
    // can test touch events in browsers that don't
    // actually support touch input (like desktop Safari).
    //
    // Zepto's touch module only uses the `pageX/Y` and `target`
    // properties of the first touch in the `touches` TouchList
    function emitTouchEvent(type, element, x, y) {
      var event = document.createEvent('Event'),
        touch = { pageX: x, pageY: y, target: element }

      event.initEvent('touch'+type, true, true)
    