opera.removeEventListener()
Description:
Removes an existing listener from an event.
Parameters:
type: The type of event. See addEventListener for the list of possible event types.listener: The object that the listener was attached to.useCapture: Which phase the listener was assigned to.
Syntax:
void removeEventListener (<DOMString> type, <EventListener> listener, UseCapture)
Example:
var myFunc = function(userJSEvent) {
userJSEvent.element.text = userJSEvent.element.text.replace(/function\s+window\.onload\(/g, 'window.onload = function(');
};
opera.removeEventListener('BeforeScript', myFunc, false);About this article
| Published in | Dev.Opera |
|---|---|
| Date | December 6, 2011 |
| Author | Opera Software |
| Tags | extensions API, injected scripts |
| Original | Internet Archive |