Patching Test.AnotherWay to use importNode in html_eq. r=crschmidt (closes #1376)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7452 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -437,7 +437,14 @@ Test.AnotherWay._html_eq_node_to_string=function( node ) {
|
|||||||
if( node.outerHTML!=null ) {
|
if( node.outerHTML!=null ) {
|
||||||
Test.AnotherWay._g_html_eq_span.innerHTML=node.outerHTML;
|
Test.AnotherWay._g_html_eq_span.innerHTML=node.outerHTML;
|
||||||
}else {
|
}else {
|
||||||
Test.AnotherWay._g_html_eq_span.appendChild( node.cloneNode( true ) );
|
var clone = node.cloneNode(true);
|
||||||
|
var node = Test.AnotherWay._g_html_eq_span;
|
||||||
|
if(node.ownerDocument && node.ownerDocument.importNode) {
|
||||||
|
if(node.ownerDocument != clone.ownerDocument) {
|
||||||
|
clone = node.ownerDocument.importNode(clone, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
node.appendChild(clone);
|
||||||
}
|
}
|
||||||
return Test.AnotherWay._g_html_eq_span.innerHTML;
|
return Test.AnotherWay._g_html_eq_span.innerHTML;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user