chrome extension unload event in background js chrome extension unload event in background js google-chrome google-chrome

chrome extension unload event in background js


This can simply be detected if reading from STDIN when listening for messages from the browser in the native messaging host fails (e.g. fread returns not the buffer length passed in). Google Chrome disconnects STDIN when it unloads the extension.