-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiframe.html
More file actions
52 lines (37 loc) · 1.38 KB
/
Copy pathiframe.html
File metadata and controls
52 lines (37 loc) · 1.38 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="css/style.css">
<meta name="description" content="">
<meta property="og:title" content="">
<meta property="og:type" content="">
<meta property="og:url" content="">
<meta property="og:image" content="">
<meta property="og:image:alt" content="">
<link rel="icon" href="/favicon.ico" sizes="nany">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="icon.png">
<link rel="manifest" href="site.webmanifest">
<meta name="theme-color" content="#fafafa">
</head>
<body>
<!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p>
<script>
debugger;
console.log('parent window ', window.parent);
document.addEventListener('DOMContentLoaded', function() {
window.addEventListener('message', (event) => {
if (event.origin !== 'https://www-s1.npr.org') {
return;
}
console.log('This is from the iframe - Message received:', event);
});
window.parent.postMessage('Hello from iframe', 'https://www-s1.npr.org');
});
</script>
</body>
</html>