For my chrome extension, I want to perform an action when the browserAction popup window closes. I understand that there no built-in events are triggered when this happens.
onDisconnect is not an assignable property. It's an object that provides addListener method to register a callback:
onDisconnect
addListener
externalPort.onDisconnect.addListener(function() { var ignoreError = chrome.runtime.lastError; console.log("onDisconnect"); });