Always create an empty DOM element for a new gadget.
This reduces the number of DOM modifications (only one replace). This also ensure that the element content is empty. Previous event listener will also be discarded (and so, reduce memory usage).
Showing
Please register or sign in to comment