Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bind()ing an event handler makes me lose access to the matched element #26

@ricardobeat

Description

@ricardobeat

Let's say you have

one.on('click .two', function (e, el) {
    // e.target = can be a descendant
    // el == the delegate root
    // this == xxx
}.bind(xxx))

There is no way you can access the actual element (.two). jQuery exposes it as e.currentTarget (I think), along with e.delegateTarget. Should we manipulate the event object too, maybe also normalize e.keyCode/which while we're at it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions