function getStyle(themeInfo) {
if (themeInfo.colors) {
console.log(`accent color: ${themeInfo.colors.frame}`);
console.log(`toolbar: ${themeInfo.colors.toolbar}`);
}
}
async function getCurrentThemeInfo() {
const themeInfo = await browser.theme.getCurrent();
getStyle(themeInfo);
}
getCurrentThemeInfo();theme.getCurrent() / notebook
theme.getCurrent()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.