Yep, that's how I did this in a couple of projects. The are a few things you should be aware of -
Make sure you don't save too often, for example when an object is dragged, don't save on every tick, save only on drop event.
Add NoSave behavior to all objects you don't need to save, to decrease the size of saved data and saving/loading time.
And also this potentially can create hundreds of saves and use a lot of browser storage. So I advise to limit the number of undo steps and recycle/reuse the save slots.