General refactoring (#2016)

* Remove // Public comments

* Fix errors

* Remove source parameter from Popup*.setOptionsContext
This commit is contained in:
toasted-nutbread 2021-11-21 12:34:57 -05:00 committed by GitHub
parent 3c798ae36d
commit 36967b1839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 27 deletions

View File

@ -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}) {

View File

@ -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});
}
/**

View File

@ -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});
}
/**

View File

@ -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.
*/

View File

@ -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');

View File

@ -37,8 +37,6 @@ class DictionaryDatabase {
this._createMediaBind = this._createMedia.bind(this);
}
// Public
async prepare() {
await this._db.open(
this._dbName,