opera.extension.onconnect
Description:
This event listener is invoked when an injected script, popup, or preferences environment is created that enables communication. The event's source (event.source) is a messagePort to the connecting environment. The following function will execute when a preferences page is opened, for example.
Example:
//
// The background process ('/background.js').
//
opera.extension.onconnect = function(event) {
var connected = true;
};
/pAbout this article
| Published in | Dev.Opera |
|---|---|
| Date | December 6, 2011 |
| Author | Opera Software |
| Tags | extensions API, messaging |
| Original | Internet Archive |