From 7e9f7e2616973418cc50f7706bd8f644cb9d5559 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 18 Feb 2024 07:58:59 -0500 Subject: Application data refactor (#699) * Pass tabId and frameId to Application * Remove casts * Remove redundant frameInformationGet calls * Expose tabId and frameId * Remove unsed * Simplify * Update FrameAncestryHandler to not need a direct frameId * Remove frameId from FrameOffsetForwarder * Remove frameId from PopupFactory * Remove frameId from Frontend * Remove frameId from PopupPreviewFrame * Fix PopupFactory and Frontend constructor * Remove frameId from Display * Remove frameId from SearchDisplayController * Restore if check --- ext/js/background/backend.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/js/background') diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 31191612..ccd828f6 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -654,7 +654,10 @@ export class Backend { const tab = sender.tab; const tabId = tab ? tab.id : void 0; const frameId = sender.frameId; - return Promise.resolve({tabId, frameId}); + return { + tabId: typeof tabId === 'number' ? tabId : null, + frameId: typeof frameId === 'number' ? frameId : null + }; } /** @type {import('api').ApiHandler<'injectStylesheet'>} */ -- cgit v1.2.3