X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F02_dom%2F05_XNodeAttr.js;h=5a5f16f7a739760f5ba957e6faff733fb9a9bde2;hb=629dcf47fbdb2b56567a1019d22b8a2eeb4f4ed6;hp=186496920d8d4a7fc0a5099be812755b092011c8;hpb=9f5ab564d20a8bd6438693146ae73209c78a2c5e;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 1864969..5a5f16f 100644 --- a/0.6.x/js/02_dom/05_XNodeAttr.js +++ b/0.6.x/js/02_dom/05_XNodeAttr.js @@ -45,7 +45,9 @@ X_Node_Attr_HAS_VALUE = { INPUT : true, TEXTAREA : true, SELECT : true, - BUTTON : true + BUTTON : true, + OBJECT : true, + PARAM : true // FlashVars が flash 側から書き換えられるケースがある }, X_Node_Attr_renameForTag = {}; @@ -126,9 +128,17 @@ Node.prototype.attr = function( nameOrObj /* v */ ){ case 'style' : case 'cssText' : return this.cssText(); + case 'text' : + return this.text(); + case 'html' : + return this.html(); + case 'selected' : + // kquery.js : safariのバグ対策 + // if ($.browser.safari && key === "selected" && tmp) tmp.selectedIndex; + // 親ノードの selectedIndex の getter を呼んでおくと値が正しくなる、ということ?( by itozyun ) + if( X_UA.WebKit ) this._rawObject.parentNode.selectedIndex; case 'value' : case 'checked' : - case 'selected' : case 'disabled' : case 'selectedIndex' : if( X_Node_Attr_HAS_VALUE[ this._tag ] ){ @@ -164,6 +174,10 @@ function X_Node_Attr_setAttr( that, attrs, newAttrs, name, v ){ case 'style' : case 'cssText' : return that.cssText( v ); + case 'text' : + return that.text( v ); + case 'html' : + return that.html( v ); }; // debug if( name.indexOf( 'on' ) === 0 ){