};\r
})( body );\r
\r
- function createTree( xnode, childNodes, skipCleanup, textarea ){\r
- var i = 0,\r
- j = 0,\r
- l = childNodes.length,\r
- child, _xnode, f, tag, text, _xtext, doc;\r
- childNodes = X.copyArray( childNodes );\r
+ function createTree( xnode, childNodes, skipCleanup, textarea ){\r
+ var i = 0,\r
+ j = 0,\r
+ l = childNodes.length,\r
+ child, _xnode, f, tag, text, _xtext, doc;\r
+ childNodes = X.copyArray( childNodes );\r
\r
- if( textarea ){\r
- xnode.attr( 'value', xnode.html() ).empty();\r
- return;\r
- };\r
+ if( textarea ){\r
+ xnode.attr( 'value', xnode.html() ).empty();\r
+ return;\r
+ };\r
\r
- for( ; i < l; ++i ){\r
- child = childNodes[ i ];\r
- tag = child.tagName;\r
- if( ( child.nodeType !== 1 && child.nodeType !== 3 ) || tag === '!' || ( tag && tag.charAt( 0 ) === '/' ) ){\r
- child.parentNode.removeChild( child );\r
+ for( ; i < l; ++i ){\r
+ child = childNodes[ i ];\r
+ tag = child.tagName;\r
+ if( ( child.nodeType !== 1 && child.nodeType !== 3 ) || tag === '!' || ( tag && tag.charAt( 0 ) === '/' ) ){\r
+ child.parentNode.removeChild( child );\r
+ continue;\r
+ };\r
+ f = false;\r
+ while( xnode._xnodes && j < xnode._xnodes.length ){\r
+ _xnode = xnode._xnodes[ j ];\r
+ _xnode.parent = xnode;\r
+ \r
+ if( _xnode._xnodeType === 1 ){\r
+ if( child.nodeType !== 1 ){\r
+ if( !( text = child.data ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ child.parentNode.removeChild( child );\r
+ break;\r
+ };\r
+ alert( '[' +xnode._tag + '>' +_xnode._tag + '] !== ' + child.nodeType + '\n' + child.data );\r
+ ++j;\r
continue;\r
};\r
- f = false;\r
- while( xnode._xnodes && j < xnode._xnodes.length ){\r
- _xnode = xnode._xnodes[ j ];\r
- _xnode.parent = xnode;\r
- \r
- if( _xnode._xnodeType === 1 ){\r
- if( child.nodeType !== 1 ){\r
- if( !( text = child.data ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
- child.parentNode.removeChild( child );\r
- break;\r
- };\r
- alert( '[' +xnode._tag + '>' +_xnode._tag + '] !== ' + child.nodeType + '\n' + child.data );\r
- ++j;\r
- continue;\r
- };\r
- if( _xnode._tag.toUpperCase() !== tag ){\r
- alert( '[' +xnode._tag + '>' +_xnode._tag + ' ' + (_xnode._xnodes ? _xnode._xnodes.length : '' ) + '] !== ' + tag + ' ' + (child.childNodes ? child.childNodes.length : '' ) + '\n' + child.outerHTML );\r
- ++j;\r
- continue;\r
- } else {\r
- _xnode._rawNode = child;\r
- //if( ( doc = child.ownerDocument || child.document ) && ( doc.createElement( 'p' ).tagName === doc.createElement( 'P' ).tagName ) ){\r
- if( tag.charAt( 0 ) === '/' ) tag = tag.slice( 1 );\r
- _xnode._tag = tag; // .toUpperCase()\r
- //};\r
- _xnode._root = xnode._root;\r
- child.UID = _xnode._uid;\r
- if( 0 <= X.Dom.cleanupTagNames.indexOf( tag.toLowerCase() ) || tag === 'SCRIPT' ){ // ie で body 内の script が2度よばれるのに対処\r
- //alert( '[' +xnode._tag + '>' + _xnode._tag + '] remove ... ' );\r
- _xnode.destroy();\r
- ++n;\r
- continue;\r
- } else {\r
- //alert( '[' +xnode._tag + '>' + _xnode._tag + ' ' + (_xnode._xnodes ? _xnode._xnodes.length : '' ) + '] === ' + tag + ' ' + (child.childNodes ? child.childNodes.length : '' ) + ' Hit\n' + child.outerHTML );\r
- child.childNodes && child.childNodes.length && createTree( _xnode, child.childNodes, skipCleanup || 0 <= X.Dom.skipCleanupTagNames.indexOf( tag.toLowerCase() ), tag === 'TEXTAREA' );\r
- };\r
- _xtext = null;\r
- f = true;\r
- ++j;\r
- break;\r
- };\r
- } else\r
- if( _xnode._xnodeType === 3 ){\r
- \r
- if( child.nodeType !== 3 ){\r
- if( !( text = _xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
- console.log( '[' +xnode._tag + '>' + _xnode._uid + '] destroy ... ' );\r
- _xnode.destroy();\r
- ++n;\r
- continue;\r
- };\r
- alert( xnode._tag + '>' + '"' + _xnode._text + '" !== ' + tag + '\n' + child.outerHTML );\r
- ++j;\r
- continue;\r
- };\r
- \r
- _xnode._rawNode = child;\r
- _xnode._root = xnode._root;\r
- if( !skipCleanup ){\r
- if( !( text = _xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
- console.log( '[' +xnode._tag + '>' + _xnode._uid + '] destroy ... ' );\r
- _xnode.destroy();\r
- ++n;\r
- continue;\r
- };\r
- if( _xtext ){\r
- _xtext.text( _xtext._text + text );\r
- console.log( '[' +xnode._tag + '>' + _xnode._uid + '] xtext,destroy ... ' );\r
- _xnode.destroy();\r
- ++n;\r
- continue;\r
- } else {\r
- //alert( xnode._tag + '>' + '"' + text + '"\n' + child.data );\r
- _xnode.text( text );\r
- };\r
- } else\r
- if( _xtext ){\r
- _xtext.text( _xtext._text + _xnode.text );\r
- console.log( '[' +xnode._tag + '>' + _xnode._uid + '] xtext,destroy ... ' );\r
- _xnode.destroy();\r
- ++n;\r
- continue;\r
- };\r
- _xtext = _xtext || _xnode;\r
- ++j;\r
- break;\r
+ if( _xnode._tag.toUpperCase() !== tag ){\r
+ alert( '[' +xnode._tag + '>' +_xnode._tag + ' ' + (_xnode._xnodes ? _xnode._xnodes.length : '' ) + '] !== ' + tag + ' ' + (child.childNodes ? child.childNodes.length : '' ) + '\n' + child.outerHTML );\r
+ ++j;\r
+ continue;\r
+ } else {\r
+ _xnode._rawNode = child;\r
+ //if( ( doc = child.ownerDocument || child.document ) && ( doc.createElement( 'p' ).tagName === doc.createElement( 'P' ).tagName ) ){\r
+ if( tag.charAt( 0 ) === '/' ) tag = tag.slice( 1 );\r
+ _xnode._tag = tag; // .toUpperCase()\r
+ //};\r
+ _xnode._root = xnode._root;\r
+ child.UID = _xnode._uid;\r
+ if( 0 <= X.Dom.cleanupTagNames.indexOf( tag.toLowerCase() ) || tag === 'SCRIPT' ){ // ie で body 内の script が2度よばれるのに対処\r
+ //alert( '[' +xnode._tag + '>' + _xnode._tag + '] remove ... ' );\r
+ _xnode.destroy();\r
+ ++n;\r
+ continue;\r
} else {\r
- alert( 'no hit!' );\r
+ //alert( '[' +xnode._tag + '>' + _xnode._tag + ' ' + (_xnode._xnodes ? _xnode._xnodes.length : '' ) + '] === ' + tag + ' ' + (child.childNodes ? child.childNodes.length : '' ) + ' Hit\n' + child.outerHTML );\r
+ child.childNodes && child.childNodes.length && createTree( _xnode, child.childNodes, skipCleanup || 0 <= X.Dom.skipCleanupTagNames.indexOf( tag.toLowerCase() ), tag === 'TEXTAREA' );\r
};\r
+ _xtext = null;\r
+ f = true;\r
++j;\r
-\r
- }; \r
- //if( !f ) alert( '**** ' + child.outerHTML );\r
- };\r
- while( xnode._xnodes && j < xnode._xnodes.length ){\r
- _xnode = xnode._xnodes[ j ];\r
- _xnode.parent = xnode;\r
- _xnode.destroy();\r
- ++n;\r
- continue;\r
+ break;\r
+ };\r
+ } else\r
+ if( _xnode._xnodeType === 3 ){\r
+ \r
+ if( child.nodeType !== 3 ){\r
+ if( !( text = _xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ console.log( '[' +xnode._tag + '>' + _xnode._uid + '] destroy ... ' );\r
+ _xnode.destroy();\r
+ ++n;\r
+ continue;\r
+ };\r
+ alert( xnode._tag + '>' + '"' + _xnode._text + '" !== ' + tag + '\n' + child.outerHTML );\r
+ ++j;\r
+ continue;\r
+ };\r
+ \r
+ _xnode._rawNode = child;\r
+ _xnode._root = xnode._root;\r
+ if( !skipCleanup ){\r
+ if( !( text = _xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ console.log( '[' +xnode._tag + '>' + _xnode._uid + '] destroy ... ' );\r
+ _xnode.destroy();\r
+ ++n;\r
+ continue;\r
+ };\r
+ if( _xtext ){\r
+ _xtext.text( _xtext._text + text );\r
+ console.log( '[' +xnode._tag + '>' + _xnode._uid + '] xtext,destroy ... ' );\r
+ _xnode.destroy();\r
+ ++n;\r
+ continue;\r
+ } else {\r
+ //alert( xnode._tag + '>' + '"' + text + '"\n' + child.data );\r
+ _xnode.text( text );\r
+ };\r
+ } else\r
+ if( _xtext ){\r
+ _xtext.text( _xtext._text + _xnode._text );\r
+ console.log( '[' +xnode._tag + '>' + _xnode._uid + '] xtext,destroy ... ' );\r
+ _xnode.destroy();\r
+ ++n;\r
+ continue;\r
+ };\r
+ _xtext = _xtext || _xnode;\r
+ ++j;\r
+ break;\r
+ } else {\r
+ alert( 'no hit!' );\r
};\r
- };\r
+ ++j;\r
+\r
+ }; \r
+ //if( !f ) alert( '**** ' + child.outerHTML );\r
+ };\r
+ while( xnode._xnodes && j < xnode._xnodes.length ){\r
+ _xnode = xnode._xnodes[ j ];\r
+ _xnode.parent = xnode;\r
+ _xnode.destroy();\r
+ ++n;\r
+ continue;\r
+ };\r
+ };\r
\r
// body の属性値の取得\r
\r
+ body.appendChild( elmProgress = document.createElement( 'div' ) );\r
+ elmProgress.style.cssText = 'position:absolute;top:0;left:0;z-index:9999;width:0;height:0.5em;background:#00f;overflow:hidden;';\r
+ \r
X.Dom.asyncParse( body.innerHTML, true )\r
- .listenOnce( X.Event.SUCCESS, X.Dom._onAsyncParseComplete, [ createTree ] );\r
- //.listen( X.Event.PROGRESS, function(e){alert(e.progress);} );\r
+ //.listenOnce( X.Event.SUCCESS, X.Dom._onAsyncParseComplete, [ createTree ] )\r
+ .listen( X.Event.PROGRESS,\r
+ function(e){\r
+ elmProgress.style.width = ( e.progress * 100 | 0 ) + '%';\r
+ }\r
+ )\r
+ .listenOnce( X.Event.SUCCESS, function( e ){\r
+ var xnodes = Node.root._xnodes = [], t;\r
+ xnodes.push.apply( xnodes, e.xnodes );\r
+ \r
+ asyncCreateTree( Node.root, body.childNodes, elmProgress );\r
+ } );\r
+\r
}) :\r
document.all ?\r
(function(){\r
var r = Node.root,\r
body = r._rawNode,\r
- i, n = 0, parser, elmProgress = '_xdom_builder_progress';\r
+ i, n = 0, elmProgress = '_xdom_builder_progress';\r
\r
function createTree( xnode, children, skipCleanup, textarea ){\r
var parent = xnode,\r
body.insertAdjacentHTML( 'BeforeEnd', '<div id="' + elmProgress + '" style="position:absolute;top:0;left:0;z-index:9999;width:0;height:0.5em;background:#00f;overflow:hidden;"></div>' );\r
elmProgress = document.all[ elmProgress ];\r
\r
- parser = X.Dom.asyncParse( body.innerHTML, true )\r
- .listenOnce( X.Event.SUCCESS, X.Dom._onAsyncParseComplete, [ createTree ] )\r
+ X.Dom.asyncParse( body.innerHTML, true )\r
+ //.listenOnce( X.Event.SUCCESS, X.Dom._onAsyncParseComplete, [ createTree ] )\r
.listen( X.Event.PROGRESS,\r
function(e){\r
elmProgress.style.width = ( e.progress * 100 | 0 ) + '%';\r
}\r
- );\r
+ )\r
+ .listenOnce( X.Event.SUCCESS, function( e ){\r
+ var xnodes = Node.root._xnodes = [], t;\r
+ xnodes.push.apply( xnodes, e.xnodes );\r
+ \r
+ asyncCreateTree( Node.root, body.childNodes || body.children, elmProgress );\r
+ } );\r
}) :\r
(function(){\r
\r
};\r
\r
\r
-function asyncCreateTree( parent, elems, xnodeProgress, async ){\r
- var xnodes = async ? 0 : X.copyArray( parent._xnodes ),\r
- l = async ? 0 : xnodes.length,\r
- current = async ? async.current : { xnodes : xnodes, l : l, i : 0 },\r
- stack = async ? async.stack : [],\r
- count = async ? async.count : 0,\r
+function asyncCreateTree( parent, elems, elmProgress, async ){\r
+ var xnodes = async ? 0 : X.copyArray( parent._xnodes ),\r
+ l = async ? 0 : xnodes.length,\r
+ current = async ? async.current : {\r
+ me : parent,\r
+ xnodes : xnodes,\r
+ l : l,\r
+ i : 0,\r
+ elems : elems,\r
+ j : 0,\r
+ xtext : null,\r
+ flag : 0\r
+ },\r
+ stack = async ? async.stack : [],\r
+ done = async ? async.done : 0,\r
startTime = X.getTime(),\r
- xnodes, xnode, l, progress;\r
+ xnode, i, dive;\r
while( current || ( current = stack.pop() ) ){\r
- for( ; current.i < current.l; ++current.i ){\r
- xnode = current.xnoeds[ current.i ];\r
- \r
- //\r
- \r
- ++count;\r
- \r
- if(( xnodes = xnode._xnodes ) && ( l = xnodes.length ) ){\r
- ++current.i;\r
- stack[ stack.length ] = current;\r
- current = {\r
- xnodes : X.copyArray( xnodes ),\r
- i : -1,\r
- l : l\r
+ i = current.i;\r
+ l = current.l;\r
+ if( i < l ){\r
+ parent = current.me;\r
+ xnodes = current.xnodes;\r
+ while( xnode = xnodes[ i ] ){ \r
+ //\r
+ dive = bindElementToXnode( parent, xnode, current );\r
+ \r
+ ++i;\r
+ ++done;\r
+ if( dive ){\r
+ current.i = i;\r
+ stack[ stack.length ] = current;\r
+ \r
+ current = dive;\r
+ i = 0;\r
+ l = dive.l;\r
+ parent = xnode;\r
+ xnodes = dive.xnodes;\r
+ continue;\r
};\r
- continue;\r
- };\r
- \r
- if( startTime + 16 <= X.getTime() ){\r
- if( async ){\r
- async.current = ++current.i < current.l && current;\r
- async.count = count;\r
+ \r
+ if( startTime + 16 <= X.getTime() ){\r
+ current.i = i;\r
+ if( async ){\r
+ async.current = i < l && current;\r
+ async.done = done;\r
+ };\r
+ X.Timer.once( 0, asyncCreateTree, [ null, null, elmProgress, async || { stack : stack, current : i < l && current, done : done } ] );\r
+ // progress\r
+ elmProgress.style.width = ( ( 1 - done / Node._chashe.length ) * 100 | 0 ) + '%';\r
+ return;\r
};\r
- X.Timer.once( 0, asyncCreateTree, [ null, xnodeProgress, async || { stack : stack, current : ++current.i < current.l && current, count : count } ] );\r
- // progress\r
- progress = 1 - count / Node._chashe.length;\r
- return;\r
- };\r
+ }; \r
};\r
current = null;\r
};\r
// complete\r
X.Dom.asyncDispatch( 0, { type : X.Dom.Event.DOM_BUILDER_COMPLETE } );\r
};\r
+\r
+bindElementToXnode =\r
+document.getElementById ?\r
+(function( parent, xnode, current ){\r
+ var elems = current.elems,\r
+ //j = current.j,\r
+ m = elems.length,\r
+ xtext = current.xtext,\r
+ skipCleanup = current.skipCleanup,\r
+ elm, tag, text;\r
+\r
+ xnode.parent = parent;\r
+\r
+ for( ; current.j < m; ++current.j ){\r
+ elm = elems[ current.j ];\r
+ tag = elm.tagName;\r
+ if( ( elm.nodeType !== 1 && elm.nodeType !== 3 ) || tag === '!' || ( tag && tag.charAt( 0 ) === '/' ) ){\r
+ elm.parentNode.removeChild( elm );\r
+ continue;\r
+ };\r
+\r
+ if( xnode._xnodeType === 1 ){\r
+ if( elm.nodeType === 3 ){\r
+ if( !( text = elm.data ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ elm.parentNode.removeChild( elm );\r
+ continue;\r
+ };\r
+ alert( '[' +parent._tag + '>' +xnode._tag + '] !== ' + elm.nodeType + '\n' + elm.data );\r
+ } else\r
+ if( xnode._tag.toUpperCase() !== tag ){\r
+ alert( '[' +parent._tag + '>' +xnode._tag + ' ' + (xnode._xnodes ? xnode._xnodes.length : '' ) + '] !== ' + tag + ' ' + (elm.childNodes ? elm.childNodes.length : '' ) + '\n' + elm.outerHTML );\r
+ } else {\r
+ xnode._rawNode = elm;\r
+ //if( ( doc = elm.ownerDocument || elm.document ) && ( doc.createElement( 'p' ).tagName === doc.createElement( 'P' ).tagName ) ){\r
+ if( tag.charAt( 0 ) === '/' ) tag = tag.slice( 1 );\r
+ xnode._tag = tag; // .toUpperCase()\r
+ //};\r
+ xnode._root = parent._root;\r
+ elm.UID = xnode._uid;\r
+ \r
+ if( tag === 'TEXTAREA' ){\r
+ xnode.attr( 'value', xnode.html() ).empty();\r
+ } else\r
+ if( 0 <= X.Dom.cleanupTagNames.indexOf( tag.toLowerCase() ) || tag === 'SCRIPT' ){ // ie で body 内の script が2度よばれるのに対処\r
+ //alert( '[' +parent._tag + '>' + xnode._tag + '] remove ... ' );\r
+ xnode.destroy();\r
+ } else\r
+ if( elm.childNodes && elm.childNodes.length ){\r
+ //alert( '[' +parent._tag + '>' + xnode._tag + ' ' + (xnode._xnodes ? xnode._xnodes.length : '' ) + '] === ' + tag + ' ' + (elm.childNodes ? elm.childNodes.length : '' ) + ' Hit\n' + elm.outerHTML );\r
+ ++current.j;\r
+ return {\r
+ me : xnode,\r
+ xnodes : X.copyArray( xnode._xnodes ),\r
+ xtext : null,\r
+ flag : 0,\r
+ i : 0,\r
+ l : xnode._xnodes.length,\r
+ elems : elm.childNodes,\r
+ j : 0,\r
+ skipCleanup : skipCleanup || 0 <= X.Dom.skipCleanupTagNames.indexOf( tag.toLowerCase() )\r
+ };\r
+ };\r
+ current.xtext = null;\r
+ };\r
+ ++current.j;\r
+ break;\r
+ };\r
+ \r
+ if( elm.nodeType !== 3 ){\r
+ if( !( text = xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ console.log( '[' +parent._tag + '>' + xnode._uid + '] destroy ... ' );\r
+ xnode.destroy();\r
+ break;\r
+ };\r
+ alert( parent._tag + '>' + '"' + xnode._text + '" !== ' + tag + '\n' + elm.outerHTML );\r
+ break;\r
+ };\r
+ \r
+ ++current.j;\r
+ xnode._rawNode = elm;\r
+ xnode._root = parent._root;\r
+ if( !skipCleanup ){\r
+ if( !( text = xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ console.log( '[' +parent._tag + '>' + xnode._uid + '] destroy ... ' );\r
+ xnode.destroy();\r
+ };\r
+ if( xtext ){\r
+ xtext.text( xtext._text + text );\r
+ console.log( '[' +parent._tag + '>' + xnode._uid + '] xtext,destroy ... ' );\r
+ xnode.destroy();\r
+ } else {\r
+ //alert( parent._tag + '>' + '"' + text + '"\n' + elm.data );\r
+ xnode.text( text );\r
+ };\r
+ } else\r
+ if( xtext ){\r
+ xtext.text( xtext._text + xnode._text );\r
+ console.log( '[' +parent._tag + '>' + xnode._uid + '] xtext,destroy ... ' );\r
+ xnode.destroy();\r
+ };\r
+ current.xtext = xtext || xnode;\r
+ break;\r
+ };\r
+}) :\r
+(function ( parent, xnode, current ){\r
+ var elems = current.elems,\r
+ j = current.j,\r
+ m = elems.length,\r
+ xtext = current.xtext,\r
+ skipCleanup = current.skipCleanup,\r
+ elm, tag, text;\r
+\r
+ xnode.parent = parent;\r
+ \r
+ if( xnode._xnodeType === 3 ){\r
+ //alert( X.Dom.cleanupWhiteSpace( xnode._text ) );\r
+ if( !skipCleanup ){\r
+ if( !( text = xnode._text ) || ( text = X.Dom.cleanupWhiteSpace( text ) ) === ' ' ){\r
+ xnode.destroy();\r
+ } else\r
+ if( xtext ){\r
+ //alert( 'xtext ' + text.charCodeAt( 0 ) + ' : ' + text.length );\r
+ xtext.text( xtext._text + text );\r
+ xnode.destroy();\r
+ } else {\r
+ //alert( 'xnode ' + text.charCodeAt( 0 ) + ' : ' + text.length );\r
+ xnode.text( text );\r
+ };\r
+ } else\r
+ if( xtext ){\r
+ //alert( 'skip ' + text.charCodeAt( 0 ) + ' : ' + text.length );\r
+ xtext.text( xtext._text + xnode._text );\r
+ xnode.destroy();\r
+ };\r
+ current.flag |= 4;\r
+ current.xtext = xtext || xnode;\r
+ return;\r
+ };\r
+ \r
+ if( xnode._xnodeType !== 1 ){\r
+ //alert( xnode._xnodeType )\r
+ return;\r
+ };\r
+ \r
+ for( ; j < m; ++j, ++current.j ){\r
+ elm = elems[ j ];\r
+ tag = elm.tagName;\r
+ /*\r
+ * 未知のタグについては、閉じタグも含めてタグ名扱いになる\r
+ */\r
+ if( tag === '!' || tag.charAt( 0 ) === '/' ){\r
+ //alert( '## ' + tag );\r
+ continue;\r
+ } else\r
+ if( xnode._tag !== tag ){\r
+ alert( xnode._tag + ' ' + ' !== ' + tag + '\nxnode.html():' + xnode.attr('cite') + '\nelm.outerHTML:' + elm.outerHTML );\r
+ } else {\r
+ ++current.j;\r
+ \r
+ xnode._rawNode = elm;\r
+ xnode._root = parent._root;\r
+ //xnode._tag = X.Dom.DTD.TAG_FIX[ tag ] || tag;\r
+ if( 0 <= X.Dom.cleanupTagNames.indexOf( tag.toLowerCase() ) || tag === 'SCRIPT' ){\r
+ xnode.destroy();\r
+ break;\r
+ };\r
+ \r
+ !xnode._id && elm.setAttribute( 'id', 'ie4uid' + xnode._uid );\r
+ elm.setAttribute( 'UID', xnode._uid );\r
+ \r
+ tag === 'INPUT' && (\r
+ !xnode._attrs ?\r
+ ( xnode._attrs = { type : 'text' } ) :\r
+ !xnode._attrs.type || ( xnode._attrs.type = 'text' )\r
+ );\r
+ current.flag |= 3;\r
+ current.xtext = null;\r
+ \r
+ if( tag === 'TEXTAREA' ){\r
+ xnode.attr( 'value', xnode.html() ).empty();\r
+ } else\r
+ if( xnode._xnodes && xnode._xnodes.length ){\r
+ return {\r
+ me : xnode,\r
+ xnodes : X.copyArray( xnode._xnodes ),\r
+ xtext : null,\r
+ flag : 0,\r
+ i : 0,\r
+ l : xnode._xnodes.length,\r
+ elems : elm.children,\r
+ j : 0,\r
+ skipCleanup : skipCleanup || 0 <= X.Dom.skipCleanupTagNames.indexOf( tag.toLowerCase() )\r
+ };\r
+ };\r
+ break;\r
+ };\r
+ };\r
+ // for\r
+ if( !xnode._rawNode ){\r
+ alert( xnode._tag + ' ' + xnode._id + ' !== none...' );\r
+ };\r
+\r
+ // textNode がある\r
+ ( current.flag & 6 ) && ( parent._dirty |= X.Dom.Dirty.IE4_TEXTNODE_FIX );\r
+});\r