Framework for handling undoable actions in a web app