How to avoid recreating the canvas container at page refresh

See this question instead.

In my project, I’m implementing a dynamic diagram creator (for more info go here).
Some data (needed by the dynamic routine) are set by the user in a different webpage, and saved in a localStorage variable. When the control goes back to main page, I’d need to skip canvas initialisation if this localStorage variable has a certain value. This is because I’d need to keep track of the diagram the user has built so far so that it can be updated with new elements based on user inputs.
Thank you in advance for your help.