If you’re using innerHTML, I would recommend looking for alternatives to doing that. Here is one.
innerHTML