| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <!-- This page is meant to load inside ChromeFrame --> | |
| 3 <head> | |
| 4 | |
| 5 <script type="text/javascript" src="chrome_frame_tester_helpers.js"></script> | |
| 6 <script type="text/javascript"> | |
| 7 | |
| 8 function onLoad() { | |
| 9 var host = window.externalHost; | |
| 10 if (host) { | |
| 11 host.postMessage( | |
| 12 "ChromeFrame navigated to: " + window.location); | |
| 13 } else { | |
| 14 appendStatus("Running in non-hosted mode"); | |
| 15 } | |
| 16 } | |
| 17 | |
| 18 var resize_event_counter = 0; | |
| 19 | |
| 20 function OnResizeEvent() { | |
| 21 width = window.innerWidth; | |
| 22 height = window.innerHeight; | |
| 23 | |
| 24 appendStatus(resize_event_counter + ". Resized to (" + width + | |
| 25 "," + height + ")"); | |
| 26 | |
| 27 var host = window.externalHost; | |
| 28 if (host) { | |
| 29 host.postMessage( | |
| 30 resize_event_counter + ":(" + width + "," + height + ")"); | |
| 31 } else { | |
| 32 appendStatus("window.externalHost is null!"); | |
| 33 } | |
| 34 } | |
| 35 </script> | |
| 36 </head> | |
| 37 | |
| 38 <body onload="onLoad();" bgcolor="#999999" onresize="OnResizeEvent();"> | |
| 39 <div id="description" style="border: 2px solid black; width: 100%"> | |
| 40 Hosted resize test component. | |
| 41 </div> | |
| 42 | |
| 43 <div id="statusPanel" style="border: 1px solid red; width: 100%"> | |
| 44 Test running.... | |
| 45 </div> | |
| 46 | |
| 47 </body> | |
| 48 </html> | |
| OLD | NEW |