function logShown(itemId) {
console.log(`shown: ${itemId}`);
browser.notifications.getAll().then((all) => {
console.log(all[itemId]);
});
}
browser.notifications.onShown.addListener(logShown);notifications.onShown / notebook
notifications.onShown
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.