Given the events and the context renderers, load the renderers into the event objects
    so that they may be able to call the 'render' method later on.
326483
def load_renderers_into_events(events, mediums, context_renderers, default_rendering_style):
    
    # Make a mapping of source groups and rendering styles to context renderers. Do
    # the same for sources and rendering styles to context renderers
    source_group_style_to_renderer = {
        (cr.source_group_id, cr.rendering_style_id): cr
        for cr in context_renderers if cr.source_group_id
    }
    source_style_to_renderer = {
        (cr.source_id, cr.rendering_style_id): cr
        for cr in context_renderers if cr.source_id
    }

    for e in events:
        for m in mediums:
            # Try the following when loading a context renderer for a medium in an event.
            # 1. Try to look up the renderer based on the source group and medium rendering style
            # 2. If step 1 doesn't work, look up based on the source and medium rendering style
            # 3. If step 2 doesn't work, look up based on the source group and default rendering style
            # 4. if step 3 doesn't work, look up based on the source and default rendering style
            # If none of those steps work, this event will not be able to be rendered for the mediun
            cr = source_group_style_to_renderer.get((e.source.group_id, m.rendering_style_id))
            if not cr:
                cr = source_style_to_renderer.get((e.source_id, m.rendering_style_id))
            if not cr and default_rendering_style:
                cr = source_group_style_to_renderer.get((e.source.group_id, default_rendering_style.id))
            if not cr and default_rendering_style:
                cr = source_style_to_renderer.get((e.source_id, default_rendering_style.id))

            if cr:
                e._context_renderers[m] = cr
1001906
def render_template(template, **context):
    
    parts = template.split('/')
    renderer = _get_renderer(parts[:-1])
    return renderer.render(renderer.load_template(parts[-1:][0]), context)
1060024
def context_loader(self, callback):
        
        if not callback or not callable(callback):
            raise Exception("Please pass in a callable that loads your context.")
        self.context_loader_callback = callback
        return callback
1119818
def _render(self, contexts, partials):
        """"""
        val = self._lookup(self.value, contexts)
        if val:
            return EMPTYSTRING
        return self._render_children(contexts, partials)
1124361
function (books, context, options) {
      kb.fetcher.load(books).then(function (xhr) {
        renderThreeColumnBrowser2(books, context, options)
      }).catch(function (err) { complain(err) })
    }
936216
function () {
    var sceneEl = this.el.sceneEl;
    var canvasEl = sceneEl.canvas;

    // Wait for canvas to load.
    if (!canvasEl) {
      sceneEl.addEventListener('render-target-loaded', bind(this.addEventListeners, this));
      return;
    }

    // Mouse events.
    canvasEl.addEventListener('mousedown', this.onMouseDown, false);
    window.addEventListener('mousemove', this.onMouseMove, false);
    window.addEventListener('mouseup', this.onMouseUp, false);

    // Touch events.
    canvasEl.addEventListener('touchstart', this.onTouchStart);
    window.addEventListener('touchmove', this.onTouchMove);
    window.addEventListener('touchend', this.onTouchEnd);

    // sceneEl events.
    sceneEl.addEventListener('enter-vr', this.onEnterVR);
    sceneEl.addEventListener('exit-vr', this.onExitVR);

    // Pointer Lock events.
    if (this.data.pointerLockEnabled) {
      document.addEventListener('pointerlockchange', this.onPointerLockChange, false);
      document.addEventListener('mozpointerlockchange', this.onPointerLockChange, false);
      document.addEventListener('pointerlockerror', this.onPointerLockError, false);
    }
  }
543756
function () {
		var chart = this,
			options = chart.options,
			callback = chart.callback;

		// Check whether the chart is ready to render
		if (!chart.isReadyToRender()) {
			return;
		}

		// Create the container
		chart.getContainer();

		// Run an early event after the container and renderer are established
		fireEvent(chart, 'init');

		
		chart.resetMargins();
		chart.setChartSize();

		// Set the common chart properties (mainly invert) from the given series
		chart.propFromSeries();

		// get axes
		chart.getAxes();

		// Initialize the series
		each(options.series || [], function (serieOptions) {
			chart.initSeries(serieOptions);
		});

		chart.linkSeries();

		// Run an event after axes and series are initialized, but before render. At this stage,
		// the series data is indexed and cached in the xData and yData arrays, so we can access
		// those before rendering. Used in Highstock. 
		fireEvent(chart, 'beforeRender'); 

		// depends on inverted and on margins being set
		chart.pointer = new Pointer(chart, options);

		chart.render();

		// add canvas
		chart.renderer.draw();
		// run callbacks
		if (callback) {
			callback.apply(chart, [chart]);
		}
		each(chart.callbacks, function (fn) {
			fn.apply(chart, [chart]);
		});
		
		
		// If the chart was rendered outside the top container, put it back in
		chart.cloneRenderTo(true);

		fireEvent(chart, 'load');

	}
573197
function() {
      inputEx.MultiAutoComplete.superclass.renderComponent.call(this);
      this.buttonAdd = inputEx.cn('button',{},{},'Add');
      Event.addListener(this.buttonAdd, 'click',this.onAdd,this,true)
      this.el.parentNode.appendChild(this.buttonAdd);

      
      this.ddlist = new inputEx.widget.ListCustom({parentEl: this.fieldContainer,maxItems: this.maxItems, maxItemsAlert: this.maxItemsAlert});
      this.ddlist.itemRemovedEvt.subscribe(function() {
         this.setClassFromState();
         this.fireUpdatedEvt();
      }, this, true);
      this.ddlist.listReorderedEvt.subscribe(this.fireUpdatedEvt, this, true);
   }
985943
function initialize() {
    var getRenderer = require( config.getRenderer ?
      path.join( './../../../', config.getRenderer ) :
      markedRenderer
    );
    var renderer = getRenderer( marked );
    filingCabinet = new FilingCabinet( config );

    readControls(
      config.controls,
      filingCabinet
    );
    readReferences(
      config.components,
      config.referenceFile,
      filingCabinet
    );
    readComponents(
      config.components,
      config.referenceFile,
      config.localeFile,
      config.layoutSegment,
      config.contentSegment,
      filingCabinet,
      renderer
    );
    readContents(
      config.contents,
      config.submenuFile,
      filingCabinet,
      renderer
    );

    logger.showInfo( '*** Validating elements...' );
    filingCabinet.finalize();
    logger.showInfo( '*** Content manager is initialized.' );

    contextFactory = new ContextFactory( config, filingCabinet );
  }
609188
def render(self, context):
        self.prepare(context)
        "  "
        if getattr(settings, 'DOUBLE_RENDER', False) and self.can_double_render:
            if 'SECOND_RENDER' not in context:
                return self.double_render()
        key = self.get_cache_key()
        if key:
            rend = cache.get(key)
            if rend is None:
                rend = self._render(context)
                cache.set(key, rend, core_settings.CACHE_TIMEOUT)
        else:
            rend = self._render(context)
        return rend
545955
@Override
	public void render(RenderingInfo renderingInfo) {
		if (renderingInfo == null) {
			throw new NullPointerException("RenderingInfo cannot be null.");
		}
		if (!(renderingInfo.getWidget() instanceof HtmlContainer)) {
			throw new IllegalArgumentException("This renderer requires a HtmlContainer to render in.");
		}
		layersModelContainer = (HtmlContainer) renderingInfo.getWidget();

		// Delegate to the layers in layer order:
		for (int i = 0; i < layersModel.getLayerCount(); i++) {
			Layer layer = layersModel.getLayer(i);

			// If we're in the middle of an animation and the layer does not support it, skip this layer:
			if (navigating && !isAnimated(layer)) {
				continue;
			}

			// Adjust the rendering info, to use a layer specific container widget:
			RenderingInfo layerInfo = new RenderingInfo(getOrCreateLayerContainer(layer), renderingInfo.getView(),
					renderingInfo.getTrajectory());
			LayerRenderer layerRenderer = layerRenderers.get(layer);
			layerRenderer.render(layerInfo);
		}
	}
677939
public static void load() {
        if (!isLoaded()) {
            ScriptInjector.fromString(LocalForageResources.INSTANCE.js().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
        }
    }
124123
function render(renderProperties, encodings, options) {
	encodings = linearizeEncodings(encodings);

	for (var i = 0; i < encodings.length; i++) {
		encodings[i].options = merge(options, encodings[i].options);
		fixOptions(encodings[i].options);
	}

	fixOptions(options);

	var Renderer = renderProperties.renderer;
	var renderer = new Renderer(renderProperties.element, encodings, options);
	renderer.render();

	if (renderProperties.afterRender) {
		renderProperties.afterRender();
	}
}
661815
function () {
      this._objects.push.apply(this._objects, arguments);
      for (var i = arguments.length; i--; ) {
        this._initObject(arguments[i]);
      }
      this.renderOnAddition && this.renderAll();
      return this;
    }
1076994
@JsOverlay
  public final void initRenderFunctions(Function renderFunctionString,
      Function[] staticRenderFnsStrings) {
    this.setRender(renderFunctionString);
    this.setStaticRenderFns(cast(staticRenderFnsStrings));
  }
870277
private void initHandlers() {
		mapWidget.getMapModel().getMapView().addMapViewChangedHandler(this);

		mapWidget.getMapModel().runWhenInitialized(new Runnable() {

			public void run() {
				zoomTo();
			}
		});
	}
879597
void onRendererSelected() {
        if (view.getRendererSelected() != null) {
            rendererLibrary = rendererManager.getRendererByName(view.getRendererSelected());
            selectCommand.execute();
        }
    }