Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

AddEventListenerOptions not available in Document, HTMLDivElement and others #18136

Copy link
Copy link
@HolgerJeromin

Description

@HolgerJeromin
Issue body actions

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)

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.