如果在骨干视图中使用它们,那么制作本地(和私有)变量/ DOM引用会更有效吗?
var app = {};
(function( window, document ) {
var variable = 'some data';
var dom_reference = document.getElementById('some-id');
app.view = Backbone.View.extend({
// some action
});
})( window, document );