Keeping Tab State in Manifest V3

214 views
Skip to first unread message

Matthew Behan-Fossey

unread,
Jan 26, 2021, 9:37:02 AM1/26/21
to Chromium Extensions
Hi All,

I've been reading all of the posted documentation and topics on this forum related to V3 and trying to decipher how I can keep an accurate and update to date state of the currently open tabs. 

My extension is a tab manager and users use a rendered version of as user's currently open tabs to drag and drop them and save them accordingly. Keeping an accurate state of the currently open tabs is crucial for this. 

Any ideas on how I can do this in MV3? 

Simeon Vincent

unread,
Jan 26, 2021, 7:49:07 PM1/26/21
to Matthew Behan-Fossey, Chromium Extensions
I'm not sure I understand. Can you explain why the existing tabs API capabilities are insufficient for your purpose?

Cheers,

Simeon - @dotproto
Chrome Extensions DevRel


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/a96638a4-4d4a-4225-8f0d-2fd165bbc242n%40chromium.org.

Matthew Behan-Fossey

unread,
Jan 27, 2021, 9:22:44 AM1/27/21
to Chromium Extensions, Simeon Vincent, Chromium Extensions, Matthew Behan-Fossey
Hi Simeon, I appreciate your timely response.

Yes, of course. I might be mistaken but I'll explain what I am currently doing, and why I'm worried I'll have trouble implementing this with MV3. 

Right now my app keeps a mirrored state of the currently open windows/tabs. In the app, you can see all of the currently open tabs. This is a web app, completely separate from the chrome extension. When you load the web app, it attempts to connect to the chrome extension via the chrome.runtime.connect api. Once connected, the chrome extension (using a background page) listens for changes in the tabs (a tab is opened, closed, or updated) and updates the state accordingly — sending changes over the connection to the web app.

This means that users can view an up to date 'state' of all their currently open tabs in one easy to view list in the web app. They can then manipulate the tabs as they see fit, drag and drop them, and save them to the web app as well. 

With the connect api being removed as well as background pages I'm struggling to imagine how I can offer this kind of experience to users. Additionally, all other functionality (Opening or closing tabs, etc. from the web app) would no longer be possible.  

Any help or suggestions would be much appreciated. I know there are many other apps out there that have similar functionality, so I'm wondering if anyone else has tackled this issue. 

Thanks,
Matthew

wOxxOm

unread,
Jan 27, 2021, 9:31:01 AM1/27/21
to Chromium Extensions, matth...@gmail.com, Simeon Vincent, Chromium Extensions
chrome.runtime.connect isn't removed and won't be removed. You're confusing it with its ancient deprecated alias  chrome.extension.connect.

While the port is connected the background service worker won't unload, but since it's an inferior web technology the limit is five minutes so you'll have to reconnect each time before that time elapses if you want to avoid a forced termination.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages