Afaik `innerhtml += ...` is bad for performance. [insertAdjacentHtml](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML) should be used instead.    edit: posted this comment on the wrong line