Created
September 18, 2012 17:53
-
-
Save joeyespo/3744643 to your computer and use it in GitHub Desktop.
See what's appending to <body> causing the IE8 error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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