We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


The ModalDialogAPI adds support for handling modal dialogs. It has to be used e.g. for alert boxes and other commonDialog instances.

Class overview

Class Name Description
modalDialog Class to handle modal dialogs.


// Include necessary modules
var RELATIVE_ROOT = '../../shared-modules';
var MODULE_REQUIRES = ['ModalDialogAPI'];

var setupModule = function(module)
  module.controller = mozmill.getBrowserController();

var testModalDialog = function()
  var md = new ModalDialogAPI.modalDialog();

  // Code that opens a modal dialog, e.g. click or keypress

var callbackHandler = function(controller)
  // Code to be executed in the modal dialog

Document Tags and Contributors

 Contributors to this page: Sheppy, zencd, Whimboo
 Last updated by: Sheppy,