blob: a510e6e2acac7116dfdd9add9f57aeb76532b2dd [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<div id="test"></div>
<script>
description('This tests the DOM 4 remove method on an Element.');
var testDiv = document.getElementById('test');
var a = document.createElement('a');
testDiv.appendChild(a);
shouldBe('testDiv.childNodes.length', '1');
a.remove();
shouldBe('testDiv.childNodes.length', '0');
a.remove();
shouldBe('testDiv.childNodes.length', '0');
</script>
<script src="../../../resources/js-test-post.js"></script>