Created
March 2, 2011 02:19
-
-
Save benjamn/850342 to your computer and use it in GitHub Desktop.
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
function getFrame() { | |
var frame, | |
frames = window.parent.document.getElementsByTagName("iframe"); | |
for (var i = 0; frame = frames[i]; ++i) | |
if (frame.contentWindow === window) | |
return frame; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment