OSDN Git Service

add Node.createAt && Node.createTestAt.
[pettanr/clientJs.git] / 0.6.x / js / 01_dom / 11_XDomNode.js
index 3f29cd1..4c443e1 100644 (file)
@@ -288,7 +288,9 @@ Node.prototype.create = function( tag, opt_attrs, opt_css ){
        return xnode;\r
 };\r
 Node.prototype.createAt = function( index, tag, opt_attrs, opt_css ){\r
-       // TODO\r
+       var xnode = Node.create( tag, opt_attrs, opt_css );\r
+       this.appendAt( index, xnode );\r
+       return xnode;\r
 };\r
 \r
 /* --------------------------------------\r
@@ -308,7 +310,9 @@ Node.prototype.createText = function( text ){
        return xnode;\r
 };\r
 Node.prototype.createTextAt = function( index, text ){\r
-       // TODO\r
+       var xtext = Node.createText( text );\r
+       this.appendAt( index, xtext );\r
+       return xtext;\r
 };\r
 \r
 /* --------------------------------------\r