Ensure Your Window is the Backbone.js Root Object

// NAMESPACE can be replaced with your site's/app's namespace if(!window.NAMESPACE) window.NAMESPACE = window.NAMESPACE || {};
When working with Underscore.js and Backbone.js it's always good to ensure that the window is the root object at all-times, especially when someone is viewing your website and/or webapp regardless of device.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.