OSDN Git Service

Version 0.6.123, remove xnode._nodeType.
[pettanr/clientJs.git] / 0.6.x / js / 02_dom / 05_XNodeAttr.js
index 8b1237a..cd96a45 100644 (file)
@@ -101,7 +101,7 @@ function X_Node_Attr_objToAttrText( obj ){
 Node.prototype.attr = function( nameOrObj /* v */ ){\r
        var attrs = this._attrs, newAttrs, f, k, elm, v;\r
        \r
-       if( this._xnodeType !== 1 ) return this;\r
+       if( !this._tag ) return this;\r
        \r
        if( nameOrObj && X.Type.isObject( nameOrObj ) ){\r
                attrs || ( attrs = this._attrs = {} );\r
@@ -113,7 +113,7 @@ Node.prototype.attr = function( nameOrObj /* v */ ){
                };\r
                if( f ){\r
                        this._attrText = false;\r
-                       this._dirty |= X_Node_Dirty.ATTR;\r
+                       this._flags |= X_Node_State.DIRTY_ATTR;\r
                        this._root && X_Node_reserveUpdate();\r
                };\r
                return this;\r
@@ -122,7 +122,7 @@ Node.prototype.attr = function( nameOrObj /* v */ ){
                // setter\r
                if( X_Node_Attr_setAttr( this, attrs || ( this._attrs = {} ), this._newAttrs || ( this._newAttrs = {} ), nameOrObj, arguments[ 1 ] ) === true ){\r
                        this._attrText = false;\r
-                       this._dirty |= X_Node_Dirty.ATTR;\r
+                       this._flags |= X_Node_State.DIRTY_ATTR;\r
                        this._root && X_Node_reserveUpdate();\r
                };\r
                return this;\r
@@ -141,16 +141,6 @@ 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
-                       case 'innerHTML' :\r
-                               return this.html();\r
-                       case 'outerHTML' :\r
-                               X_Node_outerXNode = this;\r
-                               v = this.html();\r
-                               X_Node_outerXNode = null;\r
-                               return v;\r
 \r
                        case 'selected' :\r
                                // kquery.js : safariのバグ対策\r
@@ -186,7 +176,7 @@ function X_Node_Attr_setAttr( that, attrs, newAttrs, name, v ){
                        // TODO unique の check\r
                        if( v !== that._id ){\r
                                that._id = v;\r
-                               that._dirty |= X_Node_Dirty.ID;\r
+                               that._flags |= X_Node_State.DIRTY_ID;\r
                                that._root && X_Node_reserveUpdate();\r
                        };\r
                        return; \r