Skip to content

.bind() overloads #1048

@leonard-thieu

Description

@leonard-thieu

Going off the documentation at http://api.jquery.com/bind/, the following overloads should be possible:

bind(eventType, eventData, handler)
bind(eventType, handler)
bind(eventType, eventData, preventBubble)
bind(eventType, eventData)
bind(eventType, preventBubble)
bind(eventType)
bind(events)

There's two overloads that pass event data without a user-supplied handler:

bind(eventType, eventData, preventBubble)
bind(eventType, eventData)

I'm not sure I understand the purposes of those two overloads. If you pass event data without an event handler, doesn't that mean you can never observe it?

Also, I believe this is the only method that documents accepting both true and false in place of a handler. Other methods only document allowing false. Does bind do anything special in this regard?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions