Document.addEventListener is a bad practice?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
43 views
is bad practice to add an event handler on the document ?
by | 43 views

3 Answers

0 like 0 dislike
Thus, it is possible to delegate event handlers
by
0 like 0 dislike
on the contrary
by
0 like 0 dislike
No, but for browser solutions will still be correct
document.documentElement.addEventListener(...)
Since it will be turning to the html page.
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
110,608 questions
257,187 answers
0 comments
40,796 users