I can’t see your point. You have logged the browser created object used by the DOM not the html. You do not need to save that DOM object as the browser generates it as it creates the DOM. Think of the html file, the browser will generate a similar object for every tag in the file and include the objects in the DOM. You only need to save the html, not the DOM object.
Until we see a sample of what needs to be saved we are flying blind.
Saving html to me seems weird. Normally one just saves data not the presentation of the data.