With Chrome forcing Manifest V3 onto developers of add-ons on their platform, I’ve started the annoying task of migrating my add-on. But, to be honest, it seems like the MV3 spec wasn’t really thought out very well, especially when it comes to replacing persistent background scripts with service workers. Some features just plain don’t work.
The most broken thing I’ve noticed is with port-based messaging between content scripts and the service worker. Apparent, the connection to the port automatically closes after 5 minutes, which kind of defeats the purpose of registering a port in the first place.
Something else I’m having an issue with is that service workers can’t play audio because they don’t have a window object. Sadly, this makes something as simple as playing an alarm clock noise in the background practically impossible. That seems like a big oversight to me.
Having to constantly read values from the Storage API instead of depending on cached values from the background script is a HUGE hit to performance.
This post is kind of off-topic, but I just felt the need to rant a little on a non-Chrome forum, where the answer is always “what you’re trying to do is stupid, just do it this way”.