Skip to content

Instantly share code, notes, and snippets.

@joeyespo
Created September 18, 2012 17:53
Show Gist options
  • Save joeyespo/3744643 to your computer and use it in GitHub Desktop.
Save joeyespo/3744643 to your computer and use it in GitHub Desktop.
See what's appending to <body> causing the IE8 error
<!-- Add this within the <body>, just before the first <script> or <%:Html.Script%> element -->
<script>
console.log('Capturing appendChild()');
var base = document.body;
var appendChild = base.appendChild;
base.appendChild = function(element) {
console.log(element);
console.trace();
return appendChild.apply(this, arguments);
};
</script>
<!-- [Page's <script> elements will be here] -->
<!-- Add this cleanup code just before `</body>` -->
<script>
console.log('END CAPTURE: appendChild()');
base.appendChild = appendChild;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment