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 --- types/ext/application.d.ts | 4 ++-- types/ext/extension.d.ts | 4 ++-- types/ext/frontend.d.ts | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'types') diff --git a/types/ext/application.d.ts b/types/ext/application.d.ts index 930220f0..96f76714 100644 --- a/types/ext/application.d.ts +++ b/types/ext/application.d.ts @@ -81,7 +81,7 @@ export type ApiSurface = { }; frontendRequestReadyBroadcast: { params: { - frameId: number; + frameId: number | null; }; return: void; }; @@ -101,7 +101,7 @@ export type ApiSurface = { }; frontendReady: { params: { - frameId: number; + frameId: number | null; }; return: void; }; diff --git a/types/ext/extension.d.ts b/types/ext/extension.d.ts index dc4657f0..c5e34d61 100644 --- a/types/ext/extension.d.ts +++ b/types/ext/extension.d.ts @@ -18,8 +18,8 @@ export type HtmlElementWithContentWindow = HTMLIFrameElement | HTMLFrameElement | HTMLObjectElement; export type ContentOrigin = { - tabId?: number; - frameId?: number; + tabId: number | null; + frameId: number | null; }; export type ChromeRuntimeOnMessageCallback = ( diff --git a/types/ext/frontend.d.ts b/types/ext/frontend.d.ts index 17f3d121..ca07e30c 100644 --- a/types/ext/frontend.d.ts +++ b/types/ext/frontend.d.ts @@ -29,10 +29,6 @@ export type ConstructorDetails = { popupFactory: PopupFactory; /** The nesting depth value of the popup. */ depth: number; - /** The tab ID of the host tab. */ - tabId: number | undefined; - /** The frame ID of the host frame. */ - frameId: number; /** The popup ID of the parent popup if one exists, otherwise null. */ parentPopupId: string | null; /** The frame ID of the parent popup if one exists, otherwise null. */ -- cgit v1.2.3