зеркало из https://github.com/mozilla/gecko-dev.git
17 строки
443 B
HTML
17 строки
443 B
HTML
<!DOCTYPE html>
|
|
<script>
|
|
var root = document.documentElement;
|
|
while(root.firstChild) { root.firstChild.remove(); }
|
|
var div = document.createElement("div");
|
|
root.appendChild(div);
|
|
|
|
document.addEventListener("DOMNodeRemoved", function() {
|
|
root.appendChild(document.createTextNode("some mutation"));
|
|
});
|
|
|
|
var range = document.createRange();
|
|
range.setStart(root, 0);
|
|
range.setEnd(root, root.childNodes.length);
|
|
range.deleteContents();
|
|
</script>
|