Skip to content

addEventListener third param type #14188

Closed

Description

According to https://dom.spec.whatwg.org/#interface-eventtarget addEventListener's third param should be of type boolean | AddEventListenerOptions. Should it be changed in ts libs and if so, then where should it be changed?
https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L3719

Activity

  1. sgen commented on Mar 13, 2017

    @sgen

    Just ran into this when trying to call addEventListener from a wrapper function:

    export function name(event: string, listener: function, opts: Object|boolean): void {}
  2. added
    Bug
    Domain: lib.d.ts
    on Mar 13, 2017
  3. modified the milestones: , TypeScript 2.3 on Mar 24, 2017
  4. added
    Fixed in TSJS repo
    on Apr 4, 2017
  5. modified the milestones: TypeScript 2.3, , TypeScript 2.3.1 on Apr 4, 2017
  6. added
    Fixed
    on Apr 13, 2017
  7. added
    Fixed
    and removed
    Fixed
    Fixed in TSJS repo
    on Aug 24, 2017
  8. HolgerJeromin commented on Aug 28, 2017

    @HolgerJeromin
    Contributor

    This is not fixed for document and others in TS 2.4.1 (and ts playground)

    document.addEventListener('readystatechange', function () { }, { once: true });
    document.createElement('div').addEventListener('click', function () { }, { once: true });
    
  9. mhegazy commented on Aug 29, 2017

    @mhegazy
    Contributor

    Holger Jeromin (@HolgerJeromin) please file a new issue to track that.

  10. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDomain: lib.d.tsFixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions