extension.inIncognitoContext
布尔值,其中 true
表示内容脚本在隐私浏览标签页中运行,并且扩展页面在隐私浏览进程中运行。
语法
js
let isPrivate = browser.extension.inIncognitoContext; // true 或 false
取值
指示当前脚本是否在隐私标签页或进程中运行的布尔值。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
inIncognitoContext |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Uses a non-standard name.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
备注:
此 API 基于 Chromium 的 chrome.extension
API。该文档衍生自 Chromium 代码中的 extension.json
。