![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Browser Console
I want to programatically access the open tabs #document object by the Browser Console. I am in chrome://browser/content/browser.xhtml I fallow the docs in browser console: https://firefox-source-docs.mozilla.org/devtools-user/browser_console/index.html
Following the code: var newTabBrowser = gBrowser.getBrowserForTab(gBrowser.selectedTab); newTabBrowser.addEventListener("load", function() {
newTabBrowser.contentDocument.body.innerHTML = "this page has been eaten
";}, true); newTabBrowser.contentDocument.location.href = "https://mozilla.org/";
.contentDocument is null except if current tab is a page such as page about:config
Is there a way to allow chrome:// tab to access read only of the tabs #documents property using the console?
I understand that accessing it with javascript from the browser console would be a security issue. I want to bypass it to read, analize and compare dynamic data from the open tabs.