function onGot(colors) {
for (const { color, colorCode } of colors) {
console.log(`${color}: ${colorCode}`);
}
}
function onError(error) {
console.error(error);
}
browser.contextualIdentities.getSupportedColors().then(onGot, onError);contextualIdentities.getSupportedColors() / notebook
contextualIdentities.getSupportedColors()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.