搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Browser Console

  • 無回覆
  • 0 有這個問題
more options

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.

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 = "<h1>this page has been eaten</h1>"; }, 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.

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題