I'm developing a Chrome extension that modifies a page's DOM to add extra functionality on page load. After the page loads and I'm done manipulating the DOM, one of the functions that is available to the user is a button that reads all of the text on the page and manipulates it.
My issue is that when I try to iterate through the DOM, there's a lot of objects and text that was added by my extension on page load. I only want this function to iterate through the DOM as it was originally.
Is it possible to save the state of the DOM on page load to use later on?