svnno****@sourc*****
svnno****@sourc*****
2010年 7月 16日 (金) 21:29:09 JST
Revision: 1952 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1952 Author: dhrname Date: 2010-07-16 21:29:09 +0900 (Fri, 16 Jul 2010) Log Message: ----------- setAttributeメソッドなどを実装 Modified Paths: -------------- branches/06x/061/org/w3c/core.js Modified: branches/06x/061/org/w3c/core.js =================================================================== --- branches/06x/061/org/w3c/core.js 2010-07-16 12:15:33 UTC (rev 1951) +++ branches/06x/061/org/w3c/core.js 2010-07-16 12:29:09 UTC (rev 1952) @@ -543,12 +543,16 @@ Element.constructor = Node; /* *名前空間に対応していないメソッドは、軽量化のため、機能させないようにする。代わりに、**NSメソッドを利用すること + *(getAttributeとsetAttributeは普及しているので機能させる */ /*string*/ Element.prototype.getAttribute = function( /*string*/ name) { + return (this.getAttributeNS("http://www.w3.org/2000/svg", name)); }; /*void*/ Element.prototype.setAttribute = function( /*string*/ name, /*string*/ value) { + this.setAttributeNS(null, name, value); }; /*void*/ Element.prototype.removeAttribute = function( /*string*/ name) { + this.removeAttributeNS(null, name); }; /*Attr*/ Element.prototype.getAttributeNode = function( /*string*/ name) { }; @@ -620,6 +624,7 @@ return s; }; /*boolean*/ Element.prototype.hasAttribute = function( /*string*/ name) { + return (this.hasAttributeNS("http://www.w3.org/2000/svg", name)); }; /*boolean*/ Element.prototype.hasAttributeNS = function( /*string*/ namespaceURI, /*string*/ localName) { if (this.getAttributeNodeNS(namespaceURI, localName)) { //ノードの取得に成功した場合