B2G/gaia/apps/homescreen/js/page.js
/*
   * Implements the tap behaviour
   *
   * @param{Object} DOM element
   */
Implements the tap behaviour
@param{Object} DOM element
Implements the tap behaviour @param { Object } DOM element
function pg_tap(elem) {
    if (Homescreen.isInEditMode()) {
      if (elem.classList.contains('options')) {
        var icon = GridManager.getIcon(elem.parentNode.dataset);
        if (icon.app)
          Homescreen.showAppDialog(icon.app);
      }
    } else if ('isIcon' in elem.dataset &&
               !this.olist.getAttribute('disabled')) {
      var icon = GridManager.getIcon(elem.dataset);
      if (!icon.app)
        return;
      if (icon.descriptor.entry_point) {
        icon.app.launch(icon.descriptor.entry_point);
        this.disableTap();
        return;
      }
      if (icon.cancelled) {
        GridManager.showRestartDownloadDialog(icon);
        return;
      }
      icon.app.launch();
      this.disableTap();
    }
  }
function pg_tap ( elem ) { if ( Homescreen . isInEditMode ( ) ) { if ( elem . classList . contains ( 'options' ) ) { var icon = GridManager . getIcon ( elem . parentNode . dataset ) ; if ( icon . app ) Homescreen . showAppDialog ( icon . app ) ; } } else if ( 'isIcon' in elem . dataset && ! this . olist . getAttribute ( 'disabled' ) ) { var icon = GridManager . getIcon ( elem . dataset ) ; if ( ! icon . app ) return ; if ( icon . descriptor . entry_point ) { icon . app . launch ( icon . descriptor . entry_point ) ; this . disableTap ( ) ; return ; } if ( icon . cancelled ) { GridManager . showRestartDownloadDialog ( icon ) ; return ; } icon . app . launch ( ) ; this . disableTap ( ) ; } }
Implements the tap behaviour
 @param{Object} DOM element
Implements the tap behaviour @param { Object } DOM element