Add Popup.isProxy

This commit is contained in:
toasted-nutbread 2019-12-15 21:34:18 -05:00
parent 289a1849c4
commit 30e13354b3
3 changed files with 9 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class Frontend extends TextScanner {
super( super(
window, window,
ignoreNodes, ignoreNodes,
[popup.getContainer()], popup.isProxy() ? [] : [popup.getContainer()],
[(x, y) => this.popup.containsPoint(x, y)] [(x, y) => this.popup.containsPoint(x, y)]
); );

View File

@ -48,6 +48,10 @@ class PopupProxy {
// Public functions // Public functions
isProxy() {
return true;
}
async setOptions(options) { async setOptions(options) {
const id = await this._getPopupId(); const id = await this._getPopupId();
return await this._invokeHostApi('setOptions', {id, options}); return await this._invokeHostApi('setOptions', {id, options});

View File

@ -52,6 +52,10 @@ class Popup {
// Public functions // Public functions
isProxy() {
return false;
}
async setOptions(options) { async setOptions(options) {
this.options = options; this.options = options;
this.updateTheme(); this.updateTheme();