summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-16 21:36:10 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-17 18:40:43 -0400
commit598cd32946c8e10e5aa3fcec26e3fc40af44bddf (patch)
treecd030ed1d5f60aaba15c3a1c2bec284154bfc038 /ext/fg/js/popup-proxy.js
parent779b4af590b7a9030de9da1005bb3d8f79c3c5d0 (diff)
Update *show* APIs to unified showContent and setContent
Diffstat (limited to 'ext/fg/js/popup-proxy.js')
-rw-r--r--ext/fg/js/popup-proxy.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/ext/fg/js/popup-proxy.js b/ext/fg/js/popup-proxy.js
index 6ea94b6a..53b68872 100644
--- a/ext/fg/js/popup-proxy.js
+++ b/ext/fg/js/popup-proxy.js
@@ -51,12 +51,6 @@ class PopupProxy {
return await this.invokeHostApi('setOptions', {id, options});
}
- async showOrphaned(elementRect) {
- const id = await this.getPopupId();
- elementRect = PopupProxy.DOMRectToJson(elementRect);
- return await this.invokeHostApi('showOrphaned', {id, elementRect});
- }
-
async hide(changeFocus) {
if (this.id === null) {
return;
@@ -76,16 +70,10 @@ class PopupProxy {
return await this.invokeHostApi('containsPoint', {id: this.id, x, y});
}
- async termsShow(elementRect, writingMode, definitions, context) {
- const id = await this.getPopupId();
- elementRect = PopupProxy.DOMRectToJson(elementRect);
- return await this.invokeHostApi('termsShow', {id, elementRect, writingMode, definitions, context});
- }
-
- async kanjiShow(elementRect, writingMode, definitions, context) {
+ async showContent(elementRect, writingMode, type=null, details=null) {
const id = await this.getPopupId();
elementRect = PopupProxy.DOMRectToJson(elementRect);
- return await this.invokeHostApi('kanjiShow', {id, elementRect, writingMode, definitions, context});
+ return await this.invokeHostApi('showContent', {id, elementRect, writingMode, type, details});
}
async setCustomCss(css) {