You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** The id of a document where host access requests can be shown. Must be the top-level document within a tab. If provided, the request is shown on the tab of the specified document and is removed when the document navigates to a new origin. Adding a new request will override any existent request for `tabId`. This or `tabId` must be specified. */
6831
+
documentId?: string;
6832
+
/** The URL pattern where host access requests can be shown. If provided, host access requests will only be shown on URLs that match this pattern. */
6833
+
pattern?: string;
6834
+
/** The id of the tab where host access requests can be shown. If provided, the request is shown on the specified tab and is removed when the tab navigates to a new origin. Adding a new request will override an existent request for `documentId`. This or `documentId` must be specified. */
6835
+
tabId?: number;
6836
+
}
6837
+
6838
+
/**
6839
+
* Adds a host access request. Request will only be signaled to the user if extension can be granted access to the host in the request. Request will be reset on cross-origin navigation. When accepted, grants persistent access to the site’s top origin
6840
+
* @since Chrome 133
6841
+
*/
6842
+
export function addHostAccessRequest(request: AddHostAccessRequest): Promise<void>;
6843
+
export function addHostAccessRequest(request: AddHostAccessRequest, callback: () => void): void;
6844
+
6829
6845
/**
6830
6846
* Checks if the extension has the specified permissions.
6831
6847
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
@@ -6858,6 +6874,22 @@ declare namespace chrome {
6858
6874
export function remove(permissions: Permissions): Promise<boolean>;
6859
6875
export function remove(permissions: Permissions, callback: (removed: boolean) => void): void;
6860
6876
6877
+
export interface RemoveHostAccessRequest {
6878
+
/** The id of a document where host access request will be removed. Must be the top-level document within a tab. This or `tabId` must be specified. */
6879
+
documentId?: string;
6880
+
/** The URL pattern where host access request will be removed. If provided, this must exactly match the pattern of an existing host access request. */
6881
+
pattern?: string;
6882
+
/** The id of the tab where host access request will be removed. This or `documentId` must be specified. */
6883
+
tabId?: number;
6884
+
}
6885
+
6886
+
/**
6887
+
* Removes a host access request, if existent.
6888
+
* @since Chrome 133
6889
+
*/
6890
+
export function removeHostAccessRequest(request: RemoveHostAccessRequest): Promise<void>;
6891
+
export function removeHostAccessRequest(request: RemoveHostAccessRequest, callback: () => void): void;
6892
+
6861
6893
/** Fired when access to permissions has been removed from the extension. */
export function connectNative(application: string): Port;
8630
8662
/**
8631
8663
* Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.
8632
-
* @deprecated Background pages do not exist in MV3 extensions.
8664
+
* @deprecated Removed since Chrome 133. Background pages do not exist in MV3 extensions.
8633
8665
*/
8634
8666
export function getBackgroundPage(): Promise<Window>;
8635
8667
/** Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. */
0 commit comments