opera.extension.removeEventListener()
Description:
This method removes a listener from receiving an event.
Parameters:
type: This is the type of event; allowed values are:'message','disconnect', and'connect'.eventListener: This is the function to be removed.useCapture: This is boolean, keepfalsefor now; note, this value currently has no purpose.
Syntax:
void removeEventListener (<DOMString> type, eventListerner, <boolean> useCapture)
Example:
//
// The background process ('/background.js').
//
// Add event listener for the 'message' event
opera.extension.addEventListener('message', function(event) {
var message = event.data;
}, false);
// Remove the event listener
opera.extension.removeEventListener('message', function() {}, false);
This article is licensed under a Creative Commons Attribution 3.0 Unported license.
Comments
You must be logged in to write a comment. If you're not a registered member, please sign up.