Event Delegation (checking whether e.target exists—why?)

前端 未结 0 748
伪装坚强ぢ
伪装坚强ぢ 2021-01-03 12:56

I came across this fragment of code:

if(e.target && e.target.nodeName == "LI") { // do stuff } 

in this context



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题