You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Mike Billau (JIRA)" <ji...@apache.org> on 2013/09/16 17:17:55 UTC

[jira] [Commented] (CB-4819) InAppBrowser.removeEventListener - description of callback parameter

    [ https://issues.apache.org/jira/browse/CB-4819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13768399#comment-13768399 ] 

Mike Billau commented on CB-4819:
---------------------------------

I don't think this is a bug. The callback() that you pass into removeEventListener gets fired when the event gets removed. You give revoveEventListener the name of the event to stop listening to in the first parameter, you never need to worry about telling it "which function to remove" since it doesn't care, it simply stops listening for the event. You still need the callback() to do things like remove DOM objects that listen to this event, for example.
                
> InAppBrowser.removeEventListener - description of callback parameter
> --------------------------------------------------------------------
>
>                 Key: CB-4819
>                 URL: https://issues.apache.org/jira/browse/CB-4819
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 2.9.0
>            Reporter: Peter
>            Assignee: Michael Brooks
>            Priority: Minor
>
> The documentation for removeEventListener seems like a cut/paste error from addEventListener.
> http://cordova.apache.org/docs/en/3.0.0/cordova_inappbrowser_inappbrowser.md.html#removeEventListener says:
> {quote}
> *callback:* the function to execute when the event fires. The function is passed an InAppBrowserEvent object.
> {quote}
> It might be better described as something like:
> {quote}
> *callback:* the function to be removed, which was previously registered for this event by addEventListener
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira