Closed JoshStern closed 5 years ago
That's a good idea. Maybe we can save the code (through a debounced timeout) every time it is edited, instead of when run, to avoid a situation where you had made changes, but not ran them yet when the tab was closed?
I like that a lot. Changes made in the last commit.
Thank you! Merged as 01a97b2b5984
There were a few times while going through the book that I refreshed the page and lost my work. I put together a simple localStore mechanism for saving code snippets using their
c_ident
id. This commit is the bare minimum to get it working and I could easily extend it to a key binding/menu option if you'd like.I'm not sure about using
firstChild
to get the node'sc_ident
. If this assumption isn't safe enough I can access it in a different way.Thank you for the book; it has been a great resource for learning and teaching javascript!