summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-24 17:34:53 -0400
committerGitHub <noreply@github.com>2020-07-24 17:34:53 -0400
commite493cbc998eeee5d3c368287e5c5900c4821bc9d (patch)
tree955e09e9f64116178ec98cfed736434172e0dc75 /ext/fg/js/frontend.js
parent3754c920410e90fc6b98aadc9f0dbe60dfa6a14d (diff)
Simplify Popup.showContent API to use only two details arguments (#684)
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index bd64f1ac..49cf4ca6 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -432,13 +432,17 @@ class Frontend {
}
_showPopupContent(textSource, optionsContext, type=null, details=null) {
- const context = {optionsContext, source: this._id};
this._lastShowPromise = this._popup.showContent(
- textSource.getRect(),
- textSource.getWritingMode(),
- type,
- details,
- context
+ {
+ source: this._id,
+ optionsContext,
+ elementRect: textSource.getRect(),
+ writingMode: textSource.getWritingMode()
+ },
+ {
+ type,
+ details
+ }
);
this._lastShowPromise.catch((error) => {
if (yomichan.isExtensionUnloaded) { return; }