annotate iframe-resizer/test/resources/frame.content.html @ 1:bda1cc8041bf draft

Markdown support added
author saskia-hiltemann
date Tue, 07 Oct 2014 08:47:45 -0400
parents c73753f1606f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
1 <!DOCTYPE html>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
2 <html>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
3 <head>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
4 <meta charset="utf-8">
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
5 <title>iFrame message passing test</title>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
6 <meta name="description" content="iFrame message passing test">
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
7 <script src="jquery.js"></script>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
8 <style>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
9 a { float:right; }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
10 </style>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
11 </head>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
12 <body>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
13
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
14 <b>iFrame</b>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
15
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
16 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
17 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
18 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
19 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
20 But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
21 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
22 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
23 On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
24 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
25 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
26 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
27 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
28 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
29 But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
30 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
31 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
32 On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
33 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
34 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
35 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
36 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
37 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
38 But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
39 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
40 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
41 On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
42 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
43 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
44 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
45 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
46 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
47 But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
48 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
49 <p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
50 On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
51 </p>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
52
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
53
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
54 <script type="text/javascript" src="../../js/iframeResizer.contentWindow.min.js"></script>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
55 <script type="text/javascript">
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
56
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
57 (function() {
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
58
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
59 var
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
60 msgID = '[iFrameSizerTest]', //Must match host page msg ID
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
61 firstRun = true,
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
62 logging = true,
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
63 msgIdLen= msgID.length;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
64
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
65 try{
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
66
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
67 function addEventListener(e,func){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
68 if (window.addEventListener){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
69 window.addEventListener(e,func, false);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
70 } else if (window.attachEvent){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
71 window.attachEvent('on'+e,func);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
72 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
73 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
74
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
75 function log(msg){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
76 if (logging && window.console){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
77 console.log(msg);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
78 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
79 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
80
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
81 function warn(msg){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
82 if (window.console){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
83 console.warn(msg);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
84 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
85 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
86
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
87 function receiver(event) {
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
88
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
89 function init(){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
90
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
91 function changeContent(){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
92 $('p').eq(0).remove();
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
93 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
94
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
95 function callMethod(methodName,val1,val2){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
96 if ('parentIFrame' in window)
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
97 window.parentIFrame[methodName](val1,val2);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
98 else
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
99 warn('window.parentIFrame methods not enabled.')
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
100 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
101
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
102 var
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
103 data = event.data.substr(msgIdLen).split(':'),
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
104 test = data[1];
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
105
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
106 console.info(test);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
107
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
108 switch (test){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
109 case 'changeContent':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
110 setInterval(function(){changeContent();},2);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
111 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
112 case 'close':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
113 callMethod('close');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
114 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
115 case 'pageChange':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
116 location.href = '../../example/frame.hover.html';
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
117 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
118 case 'nested':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
119 location.href = 'frame.nested.html';
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
120 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
121 case 'size':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
122 changeContent();
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
123 callMethod('size');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
124 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
125 case 'size100':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
126 callMethod('size',100);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
127 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
128 case 'size200300':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
129 callMethod('size',200,300);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
130 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
131 case 'jsTrigger':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
132 changeContent();
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
133 callMethod('trigger');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
134 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
135 case 'chkHeight':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
136 callMethod('sendMessage',document.body.offsetHeight);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
137 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
138 case 'chkBackground':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
139 callMethod('sendMessage',document.body.style.background);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
140 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
141 case 'chkSendMsg':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
142 callMethod('sendMessage','message: test');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
143 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
144 case 'chkGetId':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
145 if ('parentIFrame' in window)
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
146 callMethod('sendMessage',window.parentIFrame.getId());
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
147 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
148 case 'setHeightCalculationMethod':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
149 if ('parentIFrame' in window){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
150 parentIFrame.setHeightCalculationMethod('max');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
151 callMethod('size');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
152 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
153 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
154 case 'width':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
155 $('p').width(3000);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
156 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
157 case 'image':
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
158 $('p').html('<img src="djb.jpg">');
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
159 break;
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
160 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
161
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
162 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
163
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
164
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
165 if (msgID === event.data.substr(0,msgIdLen) ){ //Check msg ID
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
166 init();
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
167 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
168 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
169 addEventListener('message', receiver);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
170 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
171 catch(e){
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
172 warn(e);
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
173 }
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
174
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
175 })();
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
176 </script>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
177 </body>
c73753f1606f Uploaded
saskia-hiltemann
parents:
diff changeset
178 </html>