Good afternoon, javascript experts. Is there any difference in adding elements via innerHTML or appendChild ? I have long lines to add, for example
<tr><td><img class='button' alt='delete'></td></tr> Since this is a single page application, there is a possibility that the newly added elements will have to be accessed (hang handlers, delete, and so on). When added via appendChild this naturally takes a lot of lines of code and the readability of the code drops. If you just add it using template strings, readability will increase. Are there any pitfalls?