To uncover the most direct method with minimal noise, you can implement a synchronous pause that allows for exploration of the entire call stack:
- Launch Chrome's devtools.
- Right-click on the element within the "Elements" tab to display the context menu.
- Select Break On... > Subtree Modifications.
Upon any alterations in the element's "innerHTML," script execution halts, enabling review of the complete call stack in the "Sources" tab, including the function responsible for requesting the DOM adjustment.
Specific DOM modifications such as those carried out by animation libraries may employ a setTimeout
or callback that eliminates much of the preceding call stack, in which case utilizing a Profile could offer more insight, as the animation function would prominently feature in a "Heavy" view.