src/js/Storage.js
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;
      }
    }
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;
      }
    }
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 ; } }
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.
Saves a document to the localstorage . Overwrites the old document if one with the same id exists .