Commit feb475d9 authored by John Resig's avatar John Resig

Attribute values should be JS strings.

parent b83a6b7a
...@@ -206,8 +206,7 @@ var window = this; ...@@ -206,8 +206,7 @@ var window = this;
this.style = {}; this.style = {};
// Load CSS info // Load CSS info
var styles = (new String(this.getAttribute("style") || "")) var styles = (this.getAttribute("style") || "").split(/\s*;\s*/);
.split(/\s*;\s*/);
for ( var i = 0; i < styles.length; i++ ) { for ( var i = 0; i < styles.length; i++ ) {
var style = styles[i].split(/\s*:\s*/); var style = styles[i].split(/\s*:\s*/);
...@@ -348,7 +347,7 @@ var window = this; ...@@ -348,7 +347,7 @@ var window = this;
getAttribute: function(name){ getAttribute: function(name){
return this._dom.hasAttribute(name) ? return this._dom.hasAttribute(name) ?
this._dom.getAttribute(name) : new String( this._dom.getAttribute(name) ) :
null; null;
}, },
setAttribute: function(name,value){ setAttribute: function(name,value){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment