opera.extension.ondisconnect
From Opera 15 onward, Opera 11 & 12’s extension format is no longer supported, and instead, we’ve switched to Chromium’s extension model. Check out our new documentation for developing extensions for Opera 15 and higher and start building your own extensions.
Description:
This event listener is invoked when an injected script, popup or preferences environment is destroyed and communication is disabled. The event's source is a messagePort
to the disconnecting environment, used only for comparative purposes. The port itself may be closed. The following function will execute when a preferences page is opened, for example.
Example:
//
// The background process ('/background.js').
//
opera.extension.ondisconnect = function(event) {
var connected = false;
};
This article is licensed under a Creative Commons Attribution 3.0 Unported license.
Comments