OSDN Git Service

Version 0.6.179, fix X.Audio & X.AudioSprite.
[pettanr/clientJs.git] / 0.6.x / js / 02_dom / 20_XNode.js
index 7fb2e40..b775d71 100644 (file)
@@ -1223,7 +1223,7 @@ function X_Node_call( name /*, opt_args... */ ){
        };
        
        if( name === 'inView' ){
-               body   = document.body;
+               body   = X_elmBody;
                child  = raw;
                visibleX = visibleY = visibleW = visibleH = 0;
                while( child !== body ){
@@ -1461,7 +1461,7 @@ var X_Node__commitUpdate =
                        if( !elm ){
                                if( !that[ '_tag' ] ){
                                        that[ '_flags' ] &= X_Node_BitMask_RESET_DIRTY;
-                                       that[ '_rawObject' ] = elm = document.createTextNode( X_String_chrReferanceTo( that[ '_text' ] ) );
+                                       elm = document.createTextNode( X_String_chrReferanceTo( that[ '_text' ] ) );
                                        if( !X_UA[ 'IE' ] ){
                                                elm[ 'UID' ] = that[ '_uid' ];
                                        };
@@ -1469,7 +1469,7 @@ var X_Node__commitUpdate =
                                if( X_Node_strictElmCreation ){
                                        that[ '_flags' ] & X_NodeFlags_OLD_CSSTEXT && X_Node_CSS_objToCssText( that, true ); // OLD_CSSTEXT ??
                
-                                       that[ '_rawObject' ] = elm =
+                                       elm =
                                                document.createElement( [
                                                        '<', that[ '_tag' ],
                                                                ' UID="', that[ '_uid' ], '"',
@@ -1478,14 +1478,15 @@ var X_Node__commitUpdate =
                                                                X_Node_Attr_objToAttrText( that, true ),
                                                                that[ '_cssText' ] ? ' style="' + that[ '_cssText' ] + '"' : '',
                                                        '>' ].join( '' ) );
+                               } else
+                               if( that[ '_flags' ] & X_NodeFlags_IS_SVG ){
+                                       elm = document.createElementNS( 'http://www.w3.org/2000/svg', that[ '_tag' ].toLowerCase() );
                                } else {
-                                       if( that[ '_flags' ] & X_NodeFlags_IS_SVG ){
-                                               that[ '_rawObject' ] = elm = document.createElementNS( 'http://www.w3.org/2000/svg', that[ '_tag' ].toLowerCase() );
-                                       } else {
-                                               that[ '_rawObject' ] = elm = document.createElement( that[ '_tag' ] );
-                                       };
+                                       elm = document.createElement( that[ '_tag' ] );
                                };
                                
+                               that[ '_rawObject' ] = elm;
+                               
                                // IE には要素追加のタイミングで起こるメモリリークがありここで追加
                                if( !X_Node_addTreeAfterChildren ){
                                        nextElement ?