function handleUpdated(updateInfo) {
if (updateInfo.theme.colors) {
console.log(`Theme was applied: ${updateInfo.theme}`);
} else {
console.log(`Theme was removed`);
}
}
browser.theme.onUpdated.addListener(handleUpdated);theme.onUpdated / notebook
theme.onUpdated
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.