nl_tokens: ## mustacheCore . makeLiveBindingPartialRenderer Returns a renderer function that live binds a partial .
pl_tokens: function ( expressionString , state ) { expressionString = expressionString . trim ( ) ; var exprData , partialName = expressionString . split ( / \s+ / ) . shift ( ) ; if ( partialName !== expressionString ) { exprData = core . expression . parse ( expressionString ) ; } return function ( scope , parentSectionNodeList ) { //!steal-remove-start if ( process . env . NODE_ENV !== 'production' ) { scope . set ( 'scope.filename' , state . filename ) ; scope . set ( 'scope.lineNumber' , state . lineNo ) ; } //!steal-remove-end var nodeList = [ this ] ; nodeList . expression = ">" + partialName ; nodeLists . register ( nodeList , null , parentSectionNodeList || true , state . directlyNested ) ; var partialFrag = new Observation ( function ( ) { var localPartialName = partialName ; var partialScope = scope ; // If the second parameter of a partial is a custom context if ( exprData && exprData . argExprs . <mask> === 1 ) { var newContext = canReflect . getValue ( exprData . argExprs [ 0 ] . value ( scope ) ) ; if ( typeof newContext === "undefined" ) { //!steal-remove-start if ( process . env . NODE_ENV !== 'production' ) { dev . warn ( 'The context (' + exprData . argExprs [ 0 ] . key + ') you passed into the' + 'partial (' + partialName + ') is not defined in the scope!' ) ; } //!steal-remove-end } else { partialScope = scope . add ( newContext ) ; } } // Look up partials in templateContext first var partial = canReflect . getKeyValue ( partialScope . templateContext . partials , localPartialName ) ; var renderer ; if ( partial ) { renderer = function ( ) { return partial . render ? partial . render ( partialScope , nodeList ) : partial ( partialScope ) ; } ; } // Use can.view to get and render the partial. else { var scopePartialName = partialScope . read ( localPartialName , { isArgument : true } ) . value ; if ( scopePartialName === null || ! scopePartialName && localPartialName [ 0 ] === '*' ) { return frag ( "" ) ; } if ( scopePartialName ) { localPartialName = scopePartialName ; } renderer = function ( ) { if ( typeof localPartialName === "function" ) { return localPartialName ( partialScope , { } , nodeList ) ; } else { var domRenderer = core . getTemplateById ( localPartialName ) ; //!steal-remove-start if ( process . env . NODE_ENV !== 'production' ) { if ( ! domRenderer ) { dev . warn ( ( state . filename ? state . filename + ':' : '' ) + ( state . lineNo ? state . lineNo + ': ' : '' ) + 'Unable to find partial "' + localPartialName + '".' ) ; } } //!steal-remove-end return domRenderer ? domRenderer ( partialScope , { } , nodeList ) : getDocument ( ) . createDocumentFragment ( ) ; } } ; } var res = ObservationRecorder . ignore ( renderer ) ( ) ; return frag ( res ) ; } ) ; canReflect . setPriority ( partialFrag , nodeList . nesting ) ; live . html ( this , partialFrag , this . parentNode , nodeList ) ; } ; }