Closed
Description
It would be useful to have a noConflict() method to pull Handlebars out of the global namespace, similar to jQuery's http://api.jquery.com/jquery.noconflict/. It would be used like:
(function(){
var hb = Handlebars.noConflict(); // Removes window.Handlebars from the global namespace.
})();
Use cases for this:
- You're writing a gmail chrome extension that shares global namespace with gmail. You want to use Handlebars but don't want window.Handlebars.
- You're using Handlebars inside of an environment that already declares it (such as Meteor does for backwards compatibility).