X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F02_dom%2F05_XNodeAttr.js;h=cd96a459c077d53b36f7ae6d97a15415199a56b9;hb=80baf48679a9d5d59690134c361eb33673029c00;hp=8b1237ad843b2462e9a14b4d39c0ccd0de98adfe;hpb=dc5a75639232882249108b4f708916e9690e42b3;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/02_dom/05_XNodeAttr.js b/0.6.x/js/02_dom/05_XNodeAttr.js index 8b1237a..cd96a45 100644 --- a/0.6.x/js/02_dom/05_XNodeAttr.js +++ b/0.6.x/js/02_dom/05_XNodeAttr.js @@ -101,7 +101,7 @@ function X_Node_Attr_objToAttrText( obj ){ Node.prototype.attr = function( nameOrObj /* v */ ){ var attrs = this._attrs, newAttrs, f, k, elm, v; - if( this._xnodeType !== 1 ) return this; + if( !this._tag ) return this; if( nameOrObj && X.Type.isObject( nameOrObj ) ){ attrs || ( attrs = this._attrs = {} ); @@ -113,7 +113,7 @@ Node.prototype.attr = function( nameOrObj /* v */ ){ }; if( f ){ this._attrText = false; - this._dirty |= X_Node_Dirty.ATTR; + this._flags |= X_Node_State.DIRTY_ATTR; this._root && X_Node_reserveUpdate(); }; return this; @@ -122,7 +122,7 @@ Node.prototype.attr = function( nameOrObj /* v */ ){ // setter if( X_Node_Attr_setAttr( this, attrs || ( this._attrs = {} ), this._newAttrs || ( this._newAttrs = {} ), nameOrObj, arguments[ 1 ] ) === true ){ this._attrText = false; - this._dirty |= X_Node_Dirty.ATTR; + this._flags |= X_Node_State.DIRTY_ATTR; this._root && X_Node_reserveUpdate(); }; return this; @@ -141,16 +141,6 @@ Node.prototype.attr = function( nameOrObj /* v */ ){ case 'style' : case 'cssText' : return this.cssText(); - case 'text' : - return this.text(); - case 'html' : - case 'innerHTML' : - return this.html(); - case 'outerHTML' : - X_Node_outerXNode = this; - v = this.html(); - X_Node_outerXNode = null; - return v; case 'selected' : // kquery.js : safariのバグ対策 @@ -186,7 +176,7 @@ function X_Node_Attr_setAttr( that, attrs, newAttrs, name, v ){ // TODO unique の check if( v !== that._id ){ that._id = v; - that._dirty |= X_Node_Dirty.ID; + that._flags |= X_Node_State.DIRTY_ID; that._root && X_Node_reserveUpdate(); }; return;