Added a className tweak. All core and selector tests now pass.
authorJohn Resig <jeresig@gmail.com>
Mon, 9 Jul 2007 00:02:32 +0000 (00:02 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 9 Jul 2007 00:02:32 +0000 (00:02 +0000)
build/runtest/env.js

index f3afb19..bf53efa 100644 (file)
@@ -357,7 +357,10 @@ var window = this;
                set selected(val) { return this.setAttribute("selected",val); },
 
                get className() { return this.getAttribute("class") || ""; },
-               set className(val) { return this.setAttribute("class",val); },
+               set className(val) {
+                       return this.setAttribute("class",
+                               val.replace(/(^\s*|\s*$)/g,""));
+               },
                
                get type() { return this.getAttribute("type") || ""; },
                set type(val) { return this.setAttribute("type",val); },