You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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)
Update:
HTMLDivElement extends HTMLElement(with ownaddEventListenerfor specialthis)HTMLElement extends Element(with ownaddEventListenerfor specialthis)Element extends Node(with ownaddEventListenerfor specialthis)Node extends EventTargetEventTarget(withaddEventListenerwith unspecificthis)