Document.addEventListener is a bad practice?

0 like 0 dislike
10 views
is bad practice to add an event handler on the document ?
by | 10 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,186 answers
0 comments
33,932 users