documentcloud/backbone — pull request #856 by spadgos (2012-01-12 15:42:43+00:00)
Title: More compatible reference to global scope

Given some environments for including Backbone into a project, the access to the global object is not always as expected. For example, in ECMAScript 5 strict mode, and when the Backbone library is being wrapped.

I use the snippet added by this pull request in some libraries, but it's not my work. I really wish I could find the blog post which outlined the full reasoning behind it. [This answer on Stack Overflow](http://stackoverflow.com/a/6930376/9021) touches some of the same reasons, though the answer given there is different. That method doesn't pass JSLint (and this method does).