hrg...@gmail.com
unread,May 11, 2022, 6:54:18 PM5/11/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Zenitsu, salem...@gmail.com, Chromium Extensions
Take a look at this post from Simeon:
In particular, this paragraph (emphasis mine):
"The current plan is that offscreen documents will live as long as necessary to fulfil their purpose*. For example, an episode of a podcast can be over an hour long, so a podcast client extension would need to have a long lived (but not necessarily persistent) page context to play that audio file. In this scenario it's conceivable that an offscreen document will stay alive for multiple hours. Scripting a page loaded in the background (I hesitate to call that scraping, but I digress) is another case where an offscreen document may end up living for an extended period."
Apparently, the new offscreen documents will have a much longer life-time than the service worker has. I presume this will depend on the "reason" you give when creating the offscreen document. Also, this "reason" will probably be enforced by policy during the review process.
So, if the list of valid reasons for creating an offscreen document includes your use case, you could use that to create a WebSocket that lives for much longer than the service worker.
But of course, if this new functionality is not implemented before MV2 is dead, then it'll be useless as every developer would've had to solve their problems in a different way already.