Overview
The osagai/dom module has functions responsible for manipulating the DOM tree of the custom element. Use this module if your custom element will need to update the data and efficiently update the DOM.
Update DOM elements
Usually, our components needs to be updated reflecting the data passed in the Templatefunction into the DOM. This could not be so performant if we always use innerHTMLfor reflecting the template defined. For that reason, osagai use a library calledmorphdom that change only the elements in the DOM that differentiate from the previous state. Note: If you use a customrenderer in the define function, the update function will use that custom renderer instead of mophdom.