Migrating my extension from MV2 has been a real pain for me. How do I prevent my extension SW from dying before a certain event (like onMessage or onStorageChanged) is triggered? this is the scenario:
1 - Send a message to contentScript from SW
2 - Wait for the contentScript to complete an operation
3 - contentScript sends a message back to SW when it's done
Unfortunately, the SW dies between steps 2 and 3. How can I prevent that?