function gotBadgeText(text) {
console.log(text);
}
let gettingBadgeText = browser.action.getBadgeText({});
gettingBadgeText.then(gotBadgeText);action.getBadgeText() / notebook
action.getBadgeText()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.