<!DOCTYPE html>
<html>
<body>
    <p>This tests that making changes on a node that triggers a callback where we make changes 
    again on the same node does not result in an assert/crash.
    Test passes if no crash is observed.</p>  
    <img id="error-image" src="">
    <div id="container"></div>

    <script> 
        if (window.testRunner)
            testRunner.dumpAsText();
        
        var img = document.getElementById('error-image');
        var container = document.getElementById('container');

        img.onerror = function() { 
            container.parentNode.removeChild(container);
        }
        
        container.appendChild(img);
    </script>
</body>
</html>
