isVisibleAsync => isVisible

This commit is contained in:
toasted-nutbread 2019-12-15 21:49:20 -05:00
parent 29734ea6e9
commit 0fb2357ec7
4 changed files with 6 additions and 6 deletions

View File

@ -67,7 +67,7 @@ class Frontend extends TextScanner {
async onResize() {
const textSource = this.textSourceCurrent;
if (textSource !== null && await this.popup.isVisibleAsync()) {
if (textSource !== null && await this.popup.isVisible()) {
this._lastShowPromise = this.popup.showContent(
textSource.getRect(),
textSource.getWritingMode()

View File

@ -42,7 +42,7 @@ class PopupProxyHost {
['createNestedPopup', ({parentId}) => this._onApiCreateNestedPopup(parentId)],
['setOptions', ({id, options}) => this._onApiSetOptions(id, options)],
['hide', ({id, changeFocus}) => this._onApiHide(id, changeFocus)],
['isVisibleAsync', ({id}) => this._onApiIsVisibleAsync(id)],
['isVisible', ({id}) => this._onApiIsVisibleAsync(id)],
['setVisibleOverride', ({id, visible}) => this._onApiSetVisibleOverride(id, visible)],
['containsPoint', ({id, x, y}) => this._onApiContainsPoint(id, x, y)],
['showContent', ({id, elementRect, writingMode, type, details}) => this._onApiShowContent(id, elementRect, writingMode, type, details)],
@ -73,7 +73,7 @@ class PopupProxyHost {
async _onApiIsVisibleAsync(id) {
const popup = this._getPopup(id);
return await popup.isVisibleAsync();
return await popup.isVisible();
}
async _onApiSetVisibleOverride(id, visible) {

View File

@ -60,9 +60,9 @@ class PopupProxy {
return await this._invokeHostApi('hide', {id: this._id, changeFocus});
}
async isVisibleAsync() {
async isVisible() {
const id = await this._getPopupId();
return await this._invokeHostApi('isVisibleAsync', {id});
return await this._invokeHostApi('isVisible', {id});
}
async setVisibleOverride(visible) {

View File

@ -83,7 +83,7 @@ class Popup {
}
}
async isVisibleAsync() {
async isVisible() {
return this.isVisibleSync();
}