From 166451b8f76224542b49c13cb27a258eb291f05e Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 9 Feb 2021 22:56:04 -0500 Subject: Improve popup window ownership (#1364) * Update frameInformationGet to also return the tab ID * Add tabId to Frontend * Pass tabId/frameId to Display * Pass ownership information using setContent * Remove ownerFrameId for Popup classes * Use frameId instead of ownerFrameId for screenshotting * Use contentOrigin instead of owner * Update _invokeContentOrigin implementation --- ext/bg/js/search.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ext/bg/js/search.js') diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 27cba50f..dbc679b1 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -23,8 +23,8 @@ */ class DisplaySearch extends Display { - constructor(japaneseUtil, documentFocusController, hotkeyHandler) { - super('search', japaneseUtil, documentFocusController, hotkeyHandler); + constructor(tabId, frameId, japaneseUtil, documentFocusController, hotkeyHandler) { + super('search', tabId, frameId, japaneseUtil, documentFocusController, hotkeyHandler); this._searchButton = document.querySelector('#search-button'); this._queryInput = document.querySelector('#search-textbox'); this._introElement = document.querySelector('#intro'); @@ -353,7 +353,11 @@ class DisplaySearch extends Display { }, content: { definitions: null, - animate + animate, + contentOrigin: { + tabId: this.tabId, + frameId: this.frameId + } } }; if (!lookup) { details.params.lookup = 'false'; } -- cgit v1.2.3