function handleCreated(id, bookmarkInfo) {
console.log(`New bookmark ID: ${id}`);
console.log(`New bookmark URL: ${bookmarkInfo.url}`);
}
browser.bookmarks.onCreated.addListener(handleCreated);bookmarks.onCreated / notebook
bookmarks.onCreated
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.