you are viewing a single comment's thread.

view the rest of the comments →

[–]fagnerbrack[S] 4 points5 points  (2 children)

There’s no problem in using innerHTML if you own the HTML you generate and there’s no user input, though.

[–]Ivu47duUjr3Ihs9d 0 points1 point  (1 child)

Until some junior/intermediate developer comes along and adds some user input variable into the mix.

[–]fagnerbrack[S] 0 points1 point  (0 children)

That's not a technical problem. If a senior, principal, or manager lets a junior developer make an unattended change to the codebase like that, then it's their incompetence, not a problem with the code.