Skip to content

AddEventListenerOptions not available in Document, HTMLDivElement and others #18136

Closed
@HolgerJeromin

Description

@HolgerJeromin

TypeScript Version: 2.4.1

addEventListener has now an object third param type. Some were included in #15183 (closing #14188 )

But 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 });

Update:
HTMLDivElement extends HTMLElement (with own addEventListener for special this)
HTMLElement extends Element (with own addEventListener for special this)
Element extends Node (with own addEventListener for special this)
Node extends EventTarget
EventTarget (with addEventListener with unspecific this)

Metadata

Metadata

Assignees

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