• Robert Knight's avatar
    Make `ListenerCollection.add` smarter · b436080d
    Robert Knight authored
    Enable the `ListenerCollection.add` method to know the specific type of
    event that a listener will receive, based on the event target and event
    name. This simplifies usage by removing the need to cast the argument in
    most cases.
    
    The implementation relies on the target having an `on${eventName}`
    property from which the event type can be extracted. If it doesn't, it
    will fall back to `Event`.
    b436080d
listener-collection.js 2.2 KB