fix lint, add jsdoc

pull/21833/head
Bruno Windels 2020-02-06 15:29:35 +01:00
parent cf7ad725a6
commit a8958458aa
1 changed files with 8 additions and 0 deletions

View File

@ -170,6 +170,12 @@ class ModalManager {
}, deferred.promise]; }, deferred.promise];
} }
/**
* @callback onBeforeClose
* @param {string?} reason either "backgroundClick" or null
* @return {Promise<bool>} whether the dialog should close
*/
/** /**
* Open a modal view. * Open a modal view.
* *
@ -197,6 +203,8 @@ class ModalManager {
* also be removed from the stack. This is not compatible * also be removed from the stack. This is not compatible
* with being a priority modal. Only one modal can be * with being a priority modal. Only one modal can be
* static at a time. * static at a time.
* @param {Object} options? extra options for the dialog
* @param {onBeforeClose} options.onBeforeClose a callback to decide whether to close the dialog
* @returns {object} Object with 'close' parameter being a function that will close the dialog * @returns {object} Object with 'close' parameter being a function that will close the dialog
*/ */
createDialogAsync(prom, props, className, isPriorityModal, isStaticModal, options = {}) { createDialogAsync(prom, props, className, isPriorityModal, isStaticModal, options = {}) {