Steve - I would like to make the "getTemplateNode" function on the "jqueryTmplTemplateEngine" a 'public' member. Here is a hopefully helpful (and convincing :-)) explanation why:
I've written a templating engine plugin for Knockout that extends your original engine, but allows for external templates to be pulled down on-demand from the server so that they don't have to initially exist in the html document when first requested. My templating engine plugin utilizes the same functionality as yours, with the following exceptions:
So, I'm effectively adding a handful of members to your original templating engine, and tweaking the behavior of "getTemplateNode" - otherwise, the functionality is identical.
I'm proposing this merge since making the "getTemplateNode" function a 'public' member of the templating engine plugin means that my plugin (and future plugins using jquery templates) can take advantage of the clean functionality of yours simply by invoking "ko.jqueryTmplTemplateEngine.call(this, arguments);" and then extending behavior from there. Following this approach allows any plugins based on your original one to stay in sync with it as it is updated/fixed/enhanced over time.
To see an example of my "externaljQueryTemplateEngine" plugin using this forked version of Knockout.js, please go here.
I've run all the tests after applying my changes to the fork and they pass.
Modifying the jQueryTmplTemplateEngine.js file to make getTemplateNod…
…e a 'public' member of the object, so that it's behavior can be swapped out in plugins that call and override this engine plugin.
I think that the functionality in your engine would be quite interesting and useful to many people. The changes seem minor to the core. I like it! +1
Made jQueryTmplEngine's getTemplateNode function overridable (for pul…
…l request #82)