Popup proxy improvements (#764)
* Fix incorrect function invocations * Ignore setVisibleOverride when it returns null * Omit redundant async * Change default return value
This commit is contained in:
parent
8d53474945
commit
95bfe2d901
@ -122,7 +122,7 @@ class PopupFactory {
|
|||||||
promises.push(promise);
|
promises.push(promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
const results = await Promise.all(promises);
|
const results = (await Promise.all(promises)).filter(({token}) => token !== null);
|
||||||
|
|
||||||
if (errors.length === 0) {
|
if (errors.length === 0) {
|
||||||
const token = generateId(16);
|
const token = generateId(16);
|
||||||
|
@ -86,12 +86,12 @@ class PopupProxy extends EventDispatcher {
|
|||||||
return this._invokeSafe('isVisible', {id: this._id}, false);
|
return this._invokeSafe('isVisible', {id: this._id}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setVisibleOverride(value, priority) {
|
setVisibleOverride(value, priority) {
|
||||||
return this._invokeSafe('setVisibleOverride', {id: this._id, value, priority});
|
return this._invokeSafe('setVisibleOverride', {id: this._id, value, priority}, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearVisibleOverride(token) {
|
clearVisibleOverride(token) {
|
||||||
return this._invokeSafe('clearVisibleOverride', {id: this._id, token});
|
return this._invokeSafe('clearVisibleOverride', {id: this._id, token}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
async containsPoint(x, y) {
|
async containsPoint(x, y) {
|
||||||
@ -135,12 +135,12 @@ class PopupProxy extends EventDispatcher {
|
|||||||
return this._invokeSafe('updateTheme', {id: this._id});
|
return this._invokeSafe('updateTheme', {id: this._id});
|
||||||
}
|
}
|
||||||
|
|
||||||
async setCustomOuterCss(css, useWebExtensionApi) {
|
setCustomOuterCss(css, useWebExtensionApi) {
|
||||||
return this._invokeSafe('updateTheme', {id: this._id, css, useWebExtensionApi});
|
return this._invokeSafe('setCustomOuterCss', {id: this._id, css, useWebExtensionApi});
|
||||||
}
|
}
|
||||||
|
|
||||||
setChildrenSupported(value) {
|
setChildrenSupported(value) {
|
||||||
return this._invokeSafe('updateTheme', {id: this._id, value});
|
return this._invokeSafe('setChildrenSupported', {id: this._id, value});
|
||||||
}
|
}
|
||||||
|
|
||||||
getFrameRect() {
|
getFrameRect() {
|
||||||
|
Loading…
Reference in New Issue
Block a user