Group nested message handlers together

This commit is contained in:
toasted-nutbread 2019-12-15 17:01:29 -05:00
parent 88ac8f4ead
commit 3f8cc83c25

View File

@ -65,10 +65,6 @@ class PopupProxyHost {
return popup;
}
async createNestedPopup(parentId) {
return this.createPopup(parentId, 0).id;
}
getPopup(id) {
const popup = this.popups.get(id);
if (typeof popup === 'undefined') {
@ -88,6 +84,12 @@ class PopupProxyHost {
return new DOMRect(x, y, jsonRect.width, jsonRect.height);
}
// Message handlers
async createNestedPopup(parentId) {
return this.createPopup(parentId, 0).id;
}
async setOptions(id, options) {
const popup = this.getPopup(id);
return await popup.setOptions(options);