OpenLayers OpenLayers

Ticket #1376: html_eq.patch

File html_eq.patch, 0.8 kB (added by tschaub, 7 months ago)

import node before appending

  • tests/run-tests.html

    old new  
    437437    if( node.outerHTML!=null ) { 
    438438        Test.AnotherWay._g_html_eq_span.innerHTML=node.outerHTML; 
    439439    }else { 
    440         Test.AnotherWay._g_html_eq_span.appendChild( node.cloneNode( true ) ); 
     440            var clone = node.cloneNode(true); 
     441            var node = Test.AnotherWay._g_html_eq_span; 
     442            if(node.ownerDocument && node.ownerDocument.importNode) { 
     443                if(node.ownerDocument != clone.ownerDocument) { 
     444                    clone = node.ownerDocument.importNode(clone, true); 
     445                } 
     446            } 
     447            node.appendChild(clone); 
    441448    } 
    442449    return Test.AnotherWay._g_html_eq_span.innerHTML; 
    443450}