browserSettings.openBookmarksInNewTabs
一个 BrowserSetting
对象,其底层值是一个布尔值。
如果设置为 true
,当用户选择一个书签时,它会在新标签页中打开。如果设置为 false
(默认值),书签会在当前标签页中打开。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
openBookmarksInNewTabs |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
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.
示例
将设置调整为 true
:
js
function logResult(result) {
console.log(`设置已修改:${result}`);
}
browser.browserSettings.openBookmarksInNewTabs
.set({ value: true })
.then(logResult);