extension.isAllowedIncognitoAccess()
检查插件是否允许访问在“隐私浏览”模式下打开的标签页。
这是返回 Promise
的异步函数。
语法
js
let isAllowed = browser.extension.isAllowedIncognitoAccess()
参数
无。
返回值
Promise
,将会兑现布尔值:如果插件被允许访问隐私标签页,则为 true
,否则为 false
。
示例
js
function logIsAllowed(answer) {
console.log(`是否被允许:${answer}`);
}
let isAllowed = browser.extension.isAllowedIncognitoAccess();
isAllowed.then(logIsAllowed);
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
isAllowedIncognitoAccess |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- 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
。