Js Mutation Observer
Whenever a DOM element changes, we can capture it using MutationObserver. Basically you can create a new MutationObserver(callback) instance and then invoke the observe(targetNode, config) function. On a recent project there was a shop plugin I was using in a cart page. Every time user updated quantity, the form element’s id was changing randomly and I did not know how to access its reference. In a situation like this, you can add a parent element to that <form> and observe that parent element for mutation changes....