diff options
Diffstat (limited to 'ext/js/comm/cross-frame-api.js')
-rw-r--r-- | ext/js/comm/cross-frame-api.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/js/comm/cross-frame-api.js b/ext/js/comm/cross-frame-api.js index 3ac38cf2..0d3f3275 100644 --- a/ext/js/comm/cross-frame-api.js +++ b/ext/js/comm/cross-frame-api.js @@ -18,6 +18,7 @@ import {EventDispatcher, EventListenerCollection, invokeMessageHandler, log} from '../core.js'; import {ExtensionError} from '../core/extension-error.js'; +import {parseJson} from '../core/json.js'; import {yomitan} from '../yomitan.js'; /** @@ -377,9 +378,10 @@ export class CrossFrameAPI { */ _onConnect(port) { try { + /** @type {import('cross-frame-api').PortDetails} */ let details; try { - details = JSON.parse(port.name); + details = parseJson(port.name); } catch (e) { return; } |