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. modified the milestones: , TypeScript 2.3 on Mar 24, 2017
  3. modified the milestones: TypeScript 2.3, , TypeScript 2.3.1 on Apr 4, 2017
  4. added
    FixedA PR has been merged for this issue
    and removed
    FixedA PR has been merged for this issue
    Fixed in TSJS repoFix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet
    on Aug 24, 2017
  5. 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 });
    
  6. mhegazy commented on Aug 29, 2017

    @mhegazy
    Contributor

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

  7. 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

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions