backbone.layoutmanager.js
function done(context, template) {
      // Store the rendered template someplace so it can be re-assignable.
      var rendered;

      // Trigger this once the render method has completed.
      manager.callback = function(rendered) {
        // Clean up asynchronous manager properties.
        delete manager.isAsync;
        delete manager.callback;

        root._applyTemplate(rendered, manager, def);
      };

      // Ensure the cache is up-to-date.
      LayoutManager.cache(url, template);

      // Render the View into the el property.
      if (template) {
        rendered = root.renderTemplate.call(root, template, context);
      }

      // If the function was synchronous, continue execution.
      if (!manager.isAsync) {
        root._applyTemplate(rendered, manager, def);
      }
    }
function done(context, template) {
      // Store the rendered template someplace so it can be re-assignable.
      var rendered;

      // Trigger this once the render method has completed.
      manager.callback = function(rendered) {
        // Clean up asynchronous manager properties.
        delete manager.isAsync;
        delete manager.callback;

        root._applyTemplate(rendered, manager, def);
      };

      // Ensure the cache is up-to-date.
      LayoutManager.cache(url, template);

      // Render the View into the el property.
      if (template) {
        rendered = root.renderTemplate.call(root, template, context);
      }

      // If the function was synchronous, continue execution.
      if (!manager.isAsync) {
        root._applyTemplate(rendered, manager, def);
      }
    }
function done ( context , template ) { // Store the rendered template someplace so it can be re-assignable. var rendered ; // Trigger this once the render method has completed. manager . callback = function ( rendered ) { // Clean up asynchronous manager properties. delete manager . isAsync ; delete manager . callback ; root . _applyTemplate ( rendered , manager , def ) ; } ; // Ensure the cache is up-to-date. LayoutManager . cache ( url , template ) ; // Render the View into the el property. if ( template ) { rendered = root . renderTemplate . call ( root , template , context ) ; } // If the function was synchronous, continue execution. if ( ! manager . isAsync ) { root . _applyTemplate ( rendered , manager , def ) ; } }
Once the template is successfully fetched, use its contents to proceed. Context argument is first, since it is bound for partial application reasons.
Once the template is successfully fetched use its contents to proceed . Context argument is first since it is bound for partial application reasons .