Skip to content

Commit

Permalink
knockout#459 - compress string literal used by template rewriting (sa…
Browse files Browse the repository at this point in the history
…ves 140 bytes)
  • Loading branch information
mbest committed May 14, 2012
1 parent 203e2f3 commit a634f0c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/templating/templateRewriting.js
Expand Up @@ -29,9 +29,8 @@ ko.templateRewriting = (function () {
// For no obvious reason, Opera fails to evaluate rewrittenDataBindAttributeValue unless it's wrapped in an additional
// anonymous function, even though Opera's built-in debugger can evaluate it anyway. No other browser requires this
// extra indirection.
var applyBindingsToNextSiblingScript = "ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { \
return (function() { return { " + rewrittenDataBindAttributeValue + " } })() \
})";
var applyBindingsToNextSiblingScript =
"ko.__tr_ambtns(function(){return(function(){return{" + rewrittenDataBindAttributeValue + "} })()})";
return templateEngine['createJavaScriptEvaluatorBlock'](applyBindingsToNextSiblingScript) + tagToRetain;
}

Expand Down Expand Up @@ -60,5 +59,6 @@ ko.templateRewriting = (function () {
}
})();

ko.exportSymbol('templateRewriting', ko.templateRewriting);
ko.exportSymbol('templateRewriting.applyMemoizedBindingsToNextSibling', ko.templateRewriting.applyMemoizedBindingsToNextSibling); // Exported only because it has to be referenced by string lookup from within rewritten template

// Exported only because it has to be referenced by string lookup from within rewritten template
ko.exportSymbol('__tr_ambtns', ko.templateRewriting.applyMemoizedBindingsToNextSibling);

0 comments on commit a634f0c

Please sign in to comment.