Stay organized with collections Save and categorize content based on your preferences.
DescriptionThe chrome.extension
API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
The type of extension view.
Properties inIncognitoContextTrue for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
Methods getBackgroundPage()chrome.extension.getBackgroundPage(): Window | undefined
Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page.
getViews()chrome.extension.getViews(
fetchProperties?: object,
): Window[]
Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.
ParametersfetchProperties
object optional
Find a view according to a tab id. If this field is omitted, returns all views.
The type of view to get. If omitted, returns all views (including background pages and tabs).
The window to restrict the search to. If omitted, returns all views.
Array of global objects
chrome.extension.isAllowedFileSchemeAccess(): Promise<boolean>
Retrieves the state of the extension's access to the 'file://' scheme. This corresponds to the user-controlled per-extension 'Allow access to File URLs' setting accessible via the chrome://extensions page.
isAllowedIncognitoAccess()chrome.extension.isAllowedIncognitoAccess(): Promise<boolean>
Retrieves the state of the extension's access to Incognito-mode. This corresponds to the user-controlled per-extension 'Allowed in Incognito' setting accessible via the chrome://extensions page.
setUpdateUrlData()chrome.extension.setUpdateUrlData(
data: string,
): void
Sets the value of the ap CGI parameter used in the extension's update URL. This value is ignored for extensions that are hosted in the Chrome Extension Gallery.
EventsExcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4