Skip to content

Commit

Permalink
Just always use setAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswestin committed May 4, 2012
1 parent eb1d5da commit 21c7233
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@
for (var key in arg) {
if (!arg.hasOwnProperty(key)) { continue }
var val = arg[key]
if (key == 'for') {
el.setAttribute(key, val)
} else if (key == 'style') {
if (key == 'style') {
for (var styleKey in val) { setStyle(el, styleKey, val[styleKey]) }
} else {
el[key] = val
el.setAttribute(key, val)
}
}
}
Expand Down

0 comments on commit 21c7233

Please sign in to comment.