function onGot(context) {
if (!context) {
console.error("Context not found");
} else {
console.log(`Name: ${context.name}`);
}
}
function onError(e) {
console.error(e);
}
browser.contextualIdentities.get("firefox-container-1").then(onGot, onError);contextualIdentities.get() / notebook
contextualIdentities.get()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.