X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F02_dom%2F07_XNodeList.js;h=a1bf749738bd2c04d58667eef2c72c4946882468;hb=80baf48679a9d5d59690134c361eb33673029c00;hp=891bc795e5fa97827111de6ab3d3874ef9872e93;hpb=d9cca45398f61025472f2858818519562a746e61;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/02_dom/07_XNodeList.js b/0.6.x/js/02_dom/07_XNodeList.js index 891bc79..a1bf749 100644 --- a/0.6.x/js/02_dom/07_XNodeList.js +++ b/0.6.x/js/02_dom/07_XNodeList.js @@ -1,22 +1,22 @@ -X.Dom.NodeList = function( v ){ +function X_NodeList( v ){ var args = [], l = arguments.length, i = 0, - indexOf, xnode, j, n = 0, skip; + xnode, j, n = 0, skip; + for( ; i < l; ++i ){ - //args.push( arguments[ i ] ); args.push.apply( args, arguments[ i ] ); }; - //alert( arguments[ 0 ].length + ' , ' + args.length ) - if( ( l = args.length ) === 1 ) return new X.Dom.Node( args[ 0 ] ); - if( !this || this.append !== X.Dom.NodeList.prototype.append ) return new X.Dom.NodeList( args ); + + if( ( l = args.length ) === 1 ) return new Node( args[ 0 ] ); + if( !this || this.append !== X_NodeList.prototype.append ) return new X_NodeList( args ); for( i = 0; i < l; ++i ){ xnode = args[ i ]; - //xnode = xnode && xnode.constructor === X.Dom.Node ? xnode : new X.Dom.Node( xnode ); + //xnode = xnode && xnode.constructor === Node ? xnode : new Node( xnode ); skip = false; - if( xnode._xnodeType === 0 ) continue; + //if( xnode._xnodeType === 0 ) continue; for( j = 0; j < n; ++j ){ if( this[ j ] === xnode ){ skip = true; @@ -29,9 +29,9 @@ X.Dom.NodeList = function( v ){ }; }; }; -X.Dom.NodeList.prototype.length = 0; +X_NodeList.prototype.length = 0; -X.Dom.NodeList.prototype.each = function( func /* opt_args... */ ){ +X_NodeList.prototype.each = function( func /* opt_args... */ ){ var l = this.length, i = 0, args; @@ -52,15 +52,16 @@ X.Dom.NodeList.prototype.each = function( func /* opt_args... */ ){ /* -------------------------------------- * Fuction Base, multi, getter, setter, */ -X.ViewPort.listenOnce( X_TEMP.SYSTEM_EVENT_PRE_INIT, function(){ - var target = X.Dom.NodeList.prototype, - src = X.Dom.Node.prototype, +X_TEMP.onSystemReady.push( function( sys ){ + var target = X_NodeList.prototype, + src = Node.prototype, p, v, multi; for( p in src ){ + //if( X_EMPTY_OBJECT[ p ] ) continue; v = src[ p ]; if( X.Type.isFunction( v ) && !target[ p ] ){ target[ p ] = multi = new Function( [ - 'var a=arguments,f=X.Dom.Node.prototype.', p, ',t=this,i,l=t.length;', + 'var a=arguments,f=X.Node.prototype.', p, ',t=this,i,l=t.length;', 'if(l)', 'for(i=0;i