webextensions-examples
webextensions-examples copied to clipboard
native-messaging example does not show how to correctly use Port.disconnect()
Ref: https://github.com/mdn/webextensions-examples/blob/master/native-messaging/add-on/background.js
And perhaps it should. Python-side too.
I encountered a case on Chromium 96 where Port.disconnect()
does not immediately disconnect the port - onMessage
handler is still dispatched after disconnect()
is called.