I looked in the library that removeListener is supported but am not
fully sure how to use it.
I tried using "this", but that doesn't seem to successfully remove the
listener. What am I missing here?
chrome.extension.onConnect.addListener( function( port ) {
if (port.name == "foo") {
port.onMessage.addListener(function(msg) {
chrome.extension.connect( {name:
"foo"} ).onMessage.removeListener( this );
....
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---