A
BrowserSetting
object that can be used to control the position of newly opened tabs relative to already open tabs.
The underlying value is a string that can take one of three values:
BCD tables only load in the browser
This code sets the value to "afterCurrent" and then logs the new value:
async function setAfterCurrent() {
let result = await browser.browserSettings.newTabPosition.set({value: "afterCurrent"});
console.log(`Result: ${result}`);
let newValue = await browser.browserSettings.newTabPosition.get({});
console.log(`New value: ${newValue.value}`);
}
最后修改: , 由 MDN 贡献者