Skip to content

Commit

Permalink
Add attributes parameter to Backbone.View. All attributes are being a…
Browse files Browse the repository at this point in the history
…pplied to view's this.el during element creation.
  • Loading branch information
hippich committed Jan 11, 2011
1 parent 440d141 commit c3da552
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c3da552

Please sign in to comment.