const windows = browser.extension.getViews();
for (const extensionWindow of windows) {
console.log(extensionWindow.location.href);
}extension.getViews() / notebook
extension.getViews()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const windows = browser.extension.getViews({ type: "tab" });const windows = browser.extension.getViews({ type: "popup" });