function onGetResolved(r) {
console.log(`success: ${r}`);
}
function onGetRejected(e) {
console.log(`error: ${e}`);
}
browser.tabs.onCreated.addListener((tab) => {
browser.sessions
.getTabValue(tab.id, "my-key")
.then(onGetResolved, onGetRejected);
});sessions.getTabValue() / notebook
sessions.getTabValue()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.