Last active
January 4, 2016 05:19
-
-
Save omo/8574605 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
<!DOCTYPE> | |
<script> | |
window.Document.prototype.hello = function() { | |
alert("Hello!"); | |
} | |
</script> | |
<h1>Call document.hello() for me.</h1> |
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
<script> | |
function test() | |
{ | |
window.myFrame.document.hello(); | |
} | |
</script> | |
<iframe name="myFrame" src="https://rawgithub.com/omo/8574605/raw/94552e0669a6dec3dab7485109691cd158bacba8/decorated-body.html"> | |
</iframe> | |
<input type="button" onclick="test()" value="Press Me!"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment