From c3da552f3b13957a22908abddeddb04f884c04a0 Mon Sep 17 00:00:00 2001 From: Pavel Karoukin Date: Mon, 10 Jan 2011 23:06:24 -0600 Subject: [PATCH] Add attributes parameter to Backbone.View. All attributes are being applied to view's this.el during element creation. --- backbone.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backbone.js b/backbone.js index d3e94b0e..856f6d74 100644 --- a/backbone.js +++ b/backbone.js @@ -892,6 +892,7 @@ _ensureElement : function() { if (!this.el) { var attrs = {}; + if (this.attributes) attrs = this.attributes; if (this.id) attrs.id = this.id; if (this.className) attrs['class'] = this.className; this.el = this.make(this.tagName, attrs);