OSDN Git Service

Version 0.6.104, fix X_shortcut & etc.
[pettanr/clientJs.git] / 0.6.x / js / 02_dom / 05_XNodeAttr.js
index 1864969..6c23b0b 100644 (file)
@@ -126,9 +126,17 @@ Node.prototype.attr = function( nameOrObj /* v */ ){
                        case 'style' :\r
                        case 'cssText' :\r
                                return this.cssText();\r
+                       case 'text' :\r
+                               return this.text();\r
+                       case 'html' :\r
+                               return this.html();\r
+                       case 'selected' :\r
+                               // kquery.js : safariのバグ対策\r
+                               // if ($.browser.safari && key === "selected" && tmp) tmp.selectedIndex;\r
+                               // 親ノードの selectedIndex の getter を呼んでおくと値が正しくなる、ということ?( by itozyun )\r
+                               if( X_UA.WebKit ) this._rawObject.parentNode.selectedIndex;\r
                        case 'value' :\r
                        case 'checked' :\r
-                       case 'selected' :\r
                        case 'disabled' :                       \r
                        case 'selectedIndex' :\r
                                if( X_Node_Attr_HAS_VALUE[ this._tag ] ){\r
@@ -164,6 +172,10 @@ function X_Node_Attr_setAttr( that, attrs, newAttrs, name, v ){
                case 'style' :\r
                case 'cssText' :\r
                        return that.cssText( v );\r
+               case 'text' :\r
+                       return that.text( v );\r
+               case 'html' :\r
+                       return that.html( v );\r
        };\r
        // debug\r
        if( name.indexOf( 'on' ) === 0 ){\r