Created
February 22, 2017 16:52
-
-
Save kirill3333/8c525d4698977cebc543cc61bf2a1252 to your computer and use it in GitHub Desktop.
Iframe order
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<h1>IFrame</h1> | |
<script> | |
parent.window.addState("Iframe was loaded"); | |
</script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>RxExample</title> | |
</head> | |
<body> | |
<h1>Parent</h1> | |
<ul id="list"></ul> | |
<iframe src="iframe.html"></iframe> | |
<script> | |
window.addState = function(state) { | |
var node = document.createElement("LI"); | |
var textnode = document.createTextNode(state); | |
node.appendChild(textnode); | |
document.getElementById("list").appendChild(node); | |
}; | |
addState("Parent was loaded"); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment