lib/client/myelements.jquery.js
function(el, scope) {
    var tplScopeObject = {};

    $myelements.debug("Trying to update Element Scope without data from scope: %s", scope);
    // If no data is passed
    // we look up in localstorage
    $myelements.localDataForElement(el, scope, function onLocalDataForElement(err, data) {
      if (err) {
        // Maybe this is useless if there's no data to update.
        // If I don't do this, the element keeps its EJS tags untouched
        $myelements.debug("Updating element scope with empty object");
        // Default to [] because it's an object and its iterable. 
        // This way EJS templates cand use $().each to avoid 'undefined'errors
        data = [];
      }
      tplScopeObject[scope] = data;
      $myelements.doRender(el, tplScopeObject);
    });
  }
function(el, scope) {
    var tplScopeObject = {};

    $myelements.debug("Trying to update Element Scope without data from scope: %s", scope);
    // If no data is passed
    // we look up in localstorage
    $myelements.localDataForElement(el, scope, function onLocalDataForElement(err, data) {
      if (err) {
        // Maybe this is useless if there's no data to update.
        // If I don't do this, the element keeps its EJS tags untouched
        $myelements.debug("Updating element scope with empty object");
        // Default to [] because it's an object and its iterable. 
        // This way EJS templates cand use $().each to avoid 'undefined'errors
        data = [];
      }
      tplScopeObject[scope] = data;
      $myelements.doRender(el, tplScopeObject);
    });
  }
function ( el , scope ) { var tplScopeObject = { } ; $myelements . debug ( "Trying to update Element Scope without data from scope: %s" , scope ) ; // If no data is passed // we look up in localstorage $myelements . localDataForElement ( el , scope , function onLocalDataForElement ( err , data ) { if ( err ) { // Maybe this is useless if there's no data to update. // If I don't do this, the element keeps its EJS tags untouched $myelements . debug ( "Updating element scope with empty object" ) ; // Default to [] because it's an object and its iterable.  // This way EJS templates cand use $().each to avoid 'undefined'errors data = [ ] ; } tplScopeObject [ scope ] = data ; $myelements . doRender ( el , tplScopeObject ) ; } ) ; }
Recovers and element's event scope from browser storage.

@param {HTMLElement} el. The element you are trying to recover the scope from.
@param {String} scope. The scope name to recover.
Recovers and element s event scope from browser storage .