Saturday, 12 October 2019

Capture or save a current state (HTML elements) of a dynamic page from a SPA

It's possible to retrieve current state from a SPA (made on frameworks like Angular, React, etc)?

By current sate I meant a snapshot/save/export of all current HTML elements, as well styles/images and the data being shown at the moment? So can be [statically] consumed afterwards with a browser and file://?

Example:

<html>
    <head />
    <body>
        <h1>Welcome, <span ng-model="userController.username">John Doe</span></h1>
        <!-- etc -->
    </body>
</html>

Being the John Doe the current data shown by that controller.

As I tried, Save As... on browsers does not work. Save the HTML with CSS but full of tags . And I assume that depending on the SPA was developed not even saves the desired page, instead saves the master/root/main page of the SPA.

There are other tools HTTrack Website Copier but from the usage I had on past this works best for static pages, I think.

Any suggestion of tools, browser extensions or even techniques that allow me to develop the tool or extension to achieve this?



from Capture or save a current state (HTML elements) of a dynamic page from a SPA

No comments:

Post a Comment