summaryrefslogtreecommitdiff
path: root/ext/js/comm/frame-offset-forwarder.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/comm/frame-offset-forwarder.js')
-rw-r--r--ext/js/comm/frame-offset-forwarder.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/js/comm/frame-offset-forwarder.js b/ext/js/comm/frame-offset-forwarder.js
index afa6a5e6..570f3e88 100644
--- a/ext/js/comm/frame-offset-forwarder.js
+++ b/ext/js/comm/frame-offset-forwarder.js
@@ -36,7 +36,7 @@ export class FrameOffsetForwarder {
prepare() {
this._frameAncestryHandler.prepare();
yomitan.crossFrame.registerHandlers([
- ['FrameOffsetForwarder.getChildFrameRect', this._onMessageGetChildFrameRect.bind(this)]
+ ['frameOffsetForwarderGetChildFrameRect', this._onMessageGetChildFrameRect.bind(this)]
]);
}
@@ -55,7 +55,7 @@ export class FrameOffsetForwarder {
/** @type {Promise<?import('frame-offset-forwarder').ChildFrameRect>[]} */
const promises = [];
for (const frameId of ancestorFrameIds) {
- promises.push(yomitan.crossFrame.invoke(frameId, 'FrameOffsetForwarder.getChildFrameRect', {frameId: childFrameId}));
+ promises.push(yomitan.crossFrame.invoke(frameId, 'frameOffsetForwarderGetChildFrameRect', {frameId: childFrameId}));
childFrameId = frameId;
}
@@ -76,10 +76,7 @@ export class FrameOffsetForwarder {
// Private
- /**
- * @param {{frameId: number}} event
- * @returns {?import('frame-offset-forwarder').ChildFrameRect}
- */
+ /** @type {import('cross-frame-api').ApiHandler<'frameOffsetForwarderGetChildFrameRect'>} */
_onMessageGetChildFrameRect({frameId}) {
const frameElement = this._frameAncestryHandler.getChildFrameElement(frameId);
if (frameElement === null) { return null; }