-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiframe.html
37 lines (26 loc) · 877 Bytes
/
iframe.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body style="background-color: orangered;">
<h2>Iframe</h2>
<iframe src="https://github.kadasi.eu/index.html?v4" style="width:250px;height:350px;"></iframe>
<script>
var msgListener = window.addEventListener
? "addEventListener"
: "attachEvent";
var msgResend = window[msgListener];
var messageEvent = msgListener === "attachEvent"
? "onmessage"
: "message";
msgResend(messageEvent, function (e) {
if (e.origin !== 'https://github.kadasi.eu') return;
if (e.data){
parent.postMessage(e.data, '*')
}
});
</script>
</body>
</html>