Skip to content

Handlebars.noConflict() option? #887

Closed
@bradvogel

Description

@bradvogel

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:

  1. You're writing a gmail chrome extension that shares global namespace with gmail. You want to use Handlebars but don't want window.Handlebars.
  2. You're using Handlebars inside of an environment that already declares it (such as Meteor does for backwards compatibility).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions