From 295ffa6e54d04cedef35a4798cabdae71f824ee1 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 8 Jul 2020 19:50:13 -0400 Subject: Refactor DisplayFloat=>Frontend message passing (#652) * Change getOrCreatePopup arguments to be an object * Add ownerFrameId to popup and DisplayFloat * Refactor DisplayFloat host action invocation * Use CrossFrameAPI instead of window.postMessage * Update popup closing functionality on the search page --- ext/bg/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 90e9fce8..239027f7 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -255,7 +255,7 @@ class DisplaySearch extends Display { this.clearContent(); } this._setTitleText(query); - window.parent.postMessage('popupClose', '*'); + yomichan.trigger('closePopups'); } catch (e) { this.onError(e); } -- cgit v1.2.3