搜尋 Mozilla 技術支援網站

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

了解更多

Get URL From Unloaded Tab - Mobile Firefox 58.0.2

  • 2 回覆
  • 15 有這個問題
  • 1 次檢視
  • 最近回覆由 Kevin

more options

I am developing a Firefox Add-on for Mobile and PC . I want to get the URL from all tabs in the browser, even tabs that are not loaded.

Is there a way to get the URL from these unloaded tabs?

To be honest, i'm not sure if i asking the question right. This is affecting Firefox on android. The browser has 961 tabs open and I can only get the URL for the active ones that have been loaded. So I have 960 "about:blank" for tab URL entries. Is there a way to get the URL from these unloaded tabs? If I select an unloaded tab and rescan the tabs, i will have 959 duplicates and 1 new entry. So it only affects tabs that have not been viewed since the application started.

I have looked at browser.sessions and browser.tabs.query(). I thought maybe the tabs were being discarded and that was causing the issue but on PC if the tab is discarded I can still get the URL when I query. The mobile version is doing something with these old tabs. I don't know where to look for documentation on the feature. Thanks.

I am developing a Firefox Add-on for Mobile and PC . I want to get the URL from all tabs in the browser, even tabs that are not loaded. Is there a way to get the URL from these unloaded tabs? To be honest, i'm not sure if i asking the question right. This is affecting Firefox on android. The browser has 961 tabs open and I can only get the URL for the active ones that have been loaded. So I have 960 "about:blank" for tab URL entries. Is there a way to get the URL from these unloaded tabs? If I select an unloaded tab and rescan the tabs, i will have 959 duplicates and 1 new entry. So it only affects tabs that have not been viewed since the application started. I have looked at browser.sessions and browser.tabs.query(). I thought maybe the tabs were being discarded and that was causing the issue but on PC if the tab is discarded I can still get the URL when I query. The mobile version is doing something with these old tabs. I don't know where to look for documentation on the feature. Thanks.

所有回覆 (2)

more options

I'm pretty sure I found the answer. Just use a promise, reload, then discard each tab in sequence. I did it without the promise and crashed my phone like 20 times. I will update if it works, should work though, it worked on a PC with 10 discarded tabs sooo... it should work.

more options

This is an end user support forum. To get answers about addon development please use https://discourse.mozilla.org/c/add-ons/development