browserSettings.openUrlbarResultsInNewTabs
一个 BrowserSetting
对象,其底层是一个布尔值。
当用户聚焦地址栏并开始输入时,浏览器会提供自动完成建议:一个基于用户不完整输入和浏览历史的网页下拉列表。
如果设置为 true
,当用户选择这些项目之一时,项目会在新标签页中打开。如果设置为 false
(默认值),项目会在当前标签页中打开。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
openUrlbarResultsInNewTabs |
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.openUrlbarResultsInNewTabs
.set({ value: true })
.then(logResult);