Skip to content

Commit

Permalink
fixes knockout#550
Browse files Browse the repository at this point in the history
  • Loading branch information
paglias committed Dec 29, 2012
1 parent 0170022 commit ca0c530
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/templating/jquery.tmpl/jqueryTmplTemplateEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
};

ko.jqueryTmplTemplateEngine.prototype = new ko.templateEngine();
ko.jqueryTmplTemplateEngine.prototype.constructor = ko.jqueryTmplTemplateEngine;

// Use this one by default *only if jquery.tmpl is referenced*
var jqueryTmplTemplateEngineInstance = new ko.jqueryTmplTemplateEngine();
Expand Down
1 change: 1 addition & 0 deletions src/templating/native/nativeTemplateEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ko.nativeTemplateEngine = function () {
}

ko.nativeTemplateEngine.prototype = new ko.templateEngine();
ko.nativeTemplateEngine.prototype.constructor = ko.nativeTemplateEngine;
ko.nativeTemplateEngine.prototype['renderTemplateSource'] = function (templateSource, bindingContext, options) {
var useNodesIfAvailable = !(ko.utils.ieVersion < 9), // IE<9 cloneNode doesn't work properly
templateNodesFunc = useNodesIfAvailable ? templateSource['nodes'] : null,
Expand Down
1 change: 1 addition & 0 deletions src/templating/templateSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
this.domElement = element;
}
ko.templateSources.anonymousTemplate.prototype = new ko.templateSources.domElement();
ko.templateSources.anonymousTemplate.prototype.constructor = ko.templateSources.anonymousTemplate;
ko.templateSources.anonymousTemplate.prototype['text'] = function(/* valueToWrite */) {
if (arguments.length == 0) {
var templateData = ko.utils.domData.get(this.domElement, anonymousTemplatesDomDataKey) || {};
Expand Down

0 comments on commit ca0c530

Please sign in to comment.