Suppose there is such a pattern
<script id="test" type="text/html"> Test: {message} <div class="body"> {data} </div> </script> Here is his lively rough example https://jsfiddle.net/0ykLrsx9/
How can I update message or data ? If the data is more or less clear, just update the contents of the .body , then the message not so simple.
You can save a template in memory and overwrite it, but then all the events that are hung on the elements will die