svnno****@sourc*****
svnno****@sourc*****
2011年 4月 24日 (日) 21:57:28 JST
Revision: 2626 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2626 Author: dhrname Date: 2011-04-24 21:57:28 +0900 (Sun, 24 Apr 2011) Log Message: ----------- cloneNodeメソッドにおいて、in演算子の代わりに、hasOwnPropertyメソッドを使用した Modified Paths: -------------- branches/07x/076/org/w3c/core.js Modified: branches/07x/076/org/w3c/core.js =================================================================== --- branches/07x/076/org/w3c/core.js 2011-04-24 12:40:28 UTC (rev 2625) +++ branches/07x/076/org/w3c/core.js 2011-04-24 12:57:28 UTC (rev 2626) @@ -328,8 +328,9 @@ *ノードのコピーを作る。引数は、子ノードのコピーも作るかどうか。コピー機能。 */ /*Node*/ cloneNode : function( /*boolean*/ deep) { - if ("ownerDocument" in this) { - var s = this.ownerDocument.importNode(this, deep); + var s; + if (this.hasOwnProperty("ownerDocument")) { + s = this.ownerDocument.importNode(this, deep); } else { s = new Node(); }