MagneticSpark
MagneticSpark
Explore posts from servers
PD🧩 Plasmo Developers
Created by MagneticSpark on 2/12/2024 in #👟framework
How to listen to a Port's disconnect event?
To give more context, I'm using the port to send messages from content scripts to my background worker, and I read that listening to onDisconnect would be a good way to keep to know if there's any content script running without requireing the "tabs" permission. I was hoping I could just export const onDisconnect = (port) => {} or something like that
7 replies