code: function(doc) {
        try {
          localStorage.setItem(prefix + doc.id, doc.serialize());
          return true;
        } catch (error) {
          // QUOTA_EXCEEDED
          console.error("Error while saving document to local storage",
              error);
          return false;
        }
      }
docs: Saves a document to the localstorage. Overwrites the old document if
  one with the same id exists.
  
  @param {mindmaps.Document} doc
  
  @returns {Boolean} true if save was successful, false otherwise.