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
functionhide(e){e.currentTarget.style.visibility="hidden";// When this function is used as an event handler: this === e.currentTarget}varps=document.getElementsByTagName('p');for(vari=0;i<ps.length;i++){ps[i].addEventListener('click',hide,false);}
functionhide(e: Event){e.currentTarget.style.visibility="hidden";// When this function is used as an event handler: this === e.currentTarget}varps=document.getElementsByTagName('p');for(vari=0;i<ps.length;i++){ps[i].addEventListener('click',hide,false);}
Expected behavior:
e.currentTarget should be of type Element or EventTarget should extend Element
Actual behavior:
e.currentTarget is of type EventTarget which only has 3 properties
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.1.4
Code
Example from MDN: https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget
Expected behavior:
e.currentTarget should be of type Element or EventTarget should extend Element
Actual behavior:
e.currentTarget is of type EventTarget which only has 3 properties
The text was updated successfully, but these errors were encountered: