<!DOCTYPE html> <body> <script> document.addEventListener("DOMSubtreeModified", function() {}, false); document.body.insertAdjacentHTML("afterbegin", "<p>foo"); </script>