Created
November 26, 2013 11:11
-
-
Save brainwipe/7656712 to your computer and use it in GitHub Desktop.
Attempting to reproduce the problem with http://stackoverflow.com/questions/20212468/iframe-innerhtml-is-null
This file contains hidden or 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
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
var iframe = $('#frame'); | |
$("#frame").ready(function(){ | |
$("#frame").load(function () { | |
data = iframe[0].contentWindow.document.body.innerHTML; | |
if(data == "success"){ | |
console.log("success"); | |
} | |
}); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<iframe id="frame" name="frame" width="0px" height="0px" frameborder="0"></iframe> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment