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
Mouse events are using e.toElement and e.srcElement, but we're getting e.toElement is undefined in Firefox, where mouse event properties like toElement, fromElement, and srcElement aren't implemented.
I think we can use e.target for all of these. And there might be places where e.currentTarget, and e.relatedTarget will come in handy. These three are compatible across browsers.
Mouse events are using
e.toElement
ande.srcElement
, but we're gettinge.toElement is undefined
in Firefox, where mouse event properties like toElement, fromElement, and srcElement aren't implemented.I think we can use
e.target
for all of these. And there might be places wheree.currentTarget
, ande.relatedTarget
will come in handy. These three are compatible across browsers.More info:
http://stackoverflow.com/questions/31865416/what-is-the-difference-between-event-target-event-toelement-and-event-srcelemen
https://developer.mozilla.org/en-US/docs/Web/API/Event/Comparison_of_Event_Targets
The text was updated successfully, but these errors were encountered: