latex2html5.js
// Triggered once the render has succeeded.
Triggered once the render has succeeded.
Triggered once the render has succeeded .
function resolve() {
      var next;
      _.each(root.views, function(views, selector) {
        if (_.isArray(views)) {
          options.htmlBatch(root, views, selector);
        }
      });
      if (parent && !manager.insertedViaFragment) {
        if (!options.contains(parent.el, root.el)) {
          parent.getAllOptions().partial(parent.$el, root.$el, rentManager,
            manager);
        }
      }
      root.delegateEvents();
      root.hasRendered = true;
      if (next = manager.queue.shift()) {
        next();
      } else {
        delete manager.queue;
      }
      function completeRender() {
        var console = window.console;
        var afterRender = options.afterRender;
        if (afterRender) {
          afterRender.call(root, root);
        }
        root.trigger("afterRender", root);
        if (manager.noel && root.$el.length > 1) {
          if (_.isFunction(console.warn) && !options.suppressWarnings) {
            console.warn("`el: false` with multiple top level elements is " +
              "not supported.");
            if (_.isFunction(console.trace)) {
              console.trace();
            }
          }
        }
      }
      if (rentManager && rentManager.queue) {
        parent.once("afterRender", completeRender);
      } else {
        completeRender();
      }
      return def.resolveWith(root, [root]);
    }
function resolve ( ) { var next ; _ . each ( root . views , function ( views , selector ) { if ( _ . isArray ( views ) ) { options . htmlBatch ( root , views , selector ) ; } } ) ; if ( parent && ! manager . insertedViaFragment ) { if ( ! options . contains ( parent . el , root . el ) ) { parent . getAllOptions ( ) . partial ( parent . $el , root . $el , rentManager , manager ) ; } } root . delegateEvents ( ) ; root . hasRendered = true ; if ( next = manager . queue . shift ( ) ) { next ( ) ; } else { delete manager . queue ; } function completeRender ( ) { var console = window . console ; var afterRender = options . afterRender ; if ( afterRender ) { afterRender . call ( root , root ) ; } root . trigger ( "afterRender" , root ) ; if ( manager . noel && root . $el . length > 1 ) { if ( _ . isFunction ( console . warn ) && ! options . suppressWarnings ) { console . warn ( "`el: false` with multiple top level elements is " + "not supported." ) ; if ( _ . isFunction ( console . trace ) ) { console . trace ( ) ; } } } } if ( rentManager && rentManager . queue ) { parent . once ( "afterRender" , completeRender ) ; } else { completeRender ( ) ; } return def . resolveWith ( root , [ root ] ) ; }
Triggered once the render has succeeded.
Triggered once the render has succeeded .
// Insert all subViews into the parent at once. // Fragments aren't used on arrays of subviews. // If there is a parent and we weren't attached to it via the previous // method (single view), attach. // Apply the partial using parent's html() method. // Ensure events are always correctly bound after rendering. // Set this View as successfully rendered. // Only process the queue if it exists. // Ensure that the next render is only called after all other // `done` handlers have completed.  This will prevent `render` // callbacks from firing out of order. // Once the queue is depleted, remove it, the render process has // completed. // Reusable function for triggering the afterRender callback and event // and setting the hasRendered flag. // Always emit an afterRender event. // If there are multiple top level elements and `el: false` is used, // display a warning message and a stack trace. // Do not display a warning while testing or if warning suppression // is enabled. // Provide a stack trace if available to aid with debugging. // If the parent is currently rendering, wait until it has completed // until calling the nested View's `afterRender`. // Wait until the parent View has finished rendering, which could be // asynchronous, and trigger afterRender on this View once it has // compeleted. // This View and its parent have both rendered.