B2G/gaia/apps/system/js/modal_dialog.js
// When user clicks OK button on alert/confirm/prompt
When user clicks OK button on alert/confirm/prompt
When user clicks OK button on alert / confirm / prompt
function md_confirmHandler() {
    this.screen.classList.remove('modal-dialog');
    var elements = this.elements;
    var evt = this.eventForCurrentOrigin;
    var type = evt.detail.promptType || evt.detail.type;
    switch (type) {
      case 'alert':
        elements.alert.classList.remove('visible');
        break;
      case 'prompt':
        evt.detail.returnValue = elements.promptInput.value;
        elements.prompt.classList.remove('visible');
        break;
      case 'confirm':
        evt.detail.returnValue = true;
        elements.confirm.classList.remove('visible');
        break;
    }
    if (evt.isPseudo && evt.callback) {
      evt.callback(evt.detail.returnValue);
    }
    if (evt.detail.unblock)
      evt.detail.unblock();
    this.processNextEvent();
  }
function md_confirmHandler ( ) { this . screen . classList . remove ( 'modal-dialog' ) ; var elements = this . elements ; var evt = this . eventForCurrentOrigin ; var type = evt . detail . promptType || evt . detail . type ; switch ( type ) { case 'alert' : elements . alert . classList . remove ( 'visible' ) ; break ; case 'prompt' : evt . detail . returnValue = elements . promptInput . value ; elements . prompt . classList . remove ( 'visible' ) ; break ; case 'confirm' : evt . detail . returnValue = true ; elements . confirm . classList . remove ( 'visible' ) ; break ; } if ( evt . isPseudo && evt . callback ) { evt . callback ( evt . detail . returnValue ) ; } if ( evt . detail . unblock ) evt . detail . unblock ( ) ; this . processNextEvent ( ) ; }
When user clicks OK button on alert/confirm/prompt
When user clicks OK button on alert / confirm / prompt