Unobtrusive Javascript Obfuscates Event Handling

前端 未结 5 1685
[愿得一人]
[愿得一人] 2021-02-09 23:08

You know what I liked best about obtrusive javascript? You always knew what it was going to do when you triggered an event.



        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-09 23:25

    One thing: you shouldn't be able to see what will happen in JavaScript by looking at the HTML code. What nuisance is that? HTML is for structure.

    If you want to check what events are bound to certain elements, there's a bookmarklet called visual event for now, and firebug 1.6 (IIRC) will have some sort of event inspector.

提交回复
热议问题