General refactoring (#2016)
* Remove // Public comments * Fix errors * Remove source parameter from Popup*.setOptionsContext
This commit is contained in:
parent
3c798ae36d
commit
36967b1839
@ -37,8 +37,6 @@ class PopupFactory {
|
||||
this._allPopupVisibilityTokenMap = new Map();
|
||||
}
|
||||
|
||||
// Public functions
|
||||
|
||||
/**
|
||||
* Prepares the instance for use.
|
||||
*/
|
||||
@ -225,9 +223,9 @@ class PopupFactory {
|
||||
};
|
||||
}
|
||||
|
||||
async _onApiSetOptionsContext({id, optionsContext, source}) {
|
||||
async _onApiSetOptionsContext({id, optionsContext}) {
|
||||
const popup = this._getPopup(id);
|
||||
return await popup.setOptionsContext(optionsContext, source);
|
||||
return await popup.setOptionsContext(optionsContext);
|
||||
}
|
||||
|
||||
_onApiHide({id, changeFocus}) {
|
||||
|
@ -46,8 +46,6 @@ class PopupProxy extends EventDispatcher {
|
||||
this._frameOffsetExpireTimeout = 1000;
|
||||
}
|
||||
|
||||
// Public properties
|
||||
|
||||
/**
|
||||
* The ID of the popup.
|
||||
* @type {string}
|
||||
@ -125,15 +123,13 @@ class PopupProxy extends EventDispatcher {
|
||||
return this._frameId;
|
||||
}
|
||||
|
||||
// Public functions
|
||||
|
||||
/**
|
||||
* Sets the options context for the popup.
|
||||
* @param {object} optionsContext The options context object.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
setOptionsContext(optionsContext, source) {
|
||||
return this._invokeSafe('setOptionsContext', {id: this._id, optionsContext, source});
|
||||
setOptionsContext(optionsContext) {
|
||||
return this._invokeSafe('setOptionsContext', {id: this._id, optionsContext});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,8 +38,6 @@ class PopupWindow extends EventDispatcher {
|
||||
this._popupTabId = null;
|
||||
}
|
||||
|
||||
// Public properties
|
||||
|
||||
/**
|
||||
* The ID of the popup.
|
||||
* @type {string}
|
||||
@ -59,7 +57,7 @@ class PopupWindow extends EventDispatcher {
|
||||
* @type {Popup}
|
||||
*/
|
||||
set parent(value) {
|
||||
throw new Error('Not supported on PopupProxy');
|
||||
throw new Error('Not supported on PopupWindow');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,7 +75,7 @@ class PopupWindow extends EventDispatcher {
|
||||
* @throws Throws an error, since this class doesn't support children.
|
||||
*/
|
||||
set child(value) {
|
||||
throw new Error('Not supported on PopupProxy');
|
||||
throw new Error('Not supported on PopupWindow');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -113,16 +111,13 @@ class PopupWindow extends EventDispatcher {
|
||||
return this._frameId;
|
||||
}
|
||||
|
||||
|
||||
// Public functions
|
||||
|
||||
/**
|
||||
* Sets the options context for the popup.
|
||||
* @param {object} optionsContext The options context object.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
setOptionsContext(optionsContext, source) {
|
||||
return this._invoke(false, 'setOptionsContext', {id: this._id, optionsContext, source});
|
||||
setOptionsContext(optionsContext) {
|
||||
return this._invoke(false, 'setOptionsContext', {id: this._id, optionsContext});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,8 +68,6 @@ class Popup extends EventDispatcher {
|
||||
this._fullscreenEventListeners = new EventListenerCollection();
|
||||
}
|
||||
|
||||
// Public properties
|
||||
|
||||
/**
|
||||
* The ID of the popup.
|
||||
* @type {string}
|
||||
@ -143,8 +141,6 @@ class Popup extends EventDispatcher {
|
||||
return this._frameId;
|
||||
}
|
||||
|
||||
// Public functions
|
||||
|
||||
/**
|
||||
* Prepares the popup for use.
|
||||
*/
|
||||
|
@ -21,8 +21,6 @@ class Database {
|
||||
this._isOpening = false;
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
async open(databaseName, version, structure) {
|
||||
if (this._db !== null) {
|
||||
throw new Error('Database already open');
|
||||
|
@ -37,8 +37,6 @@ class DictionaryDatabase {
|
||||
this._createMediaBind = this._createMedia.bind(this);
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
async prepare() {
|
||||
await this._db.open(
|
||||
this._dbName,
|
||||
|
Loading…
Reference in New Issue
Block a user