OLD | NEW |
(Empty) | |
| 1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo.
gif); |
| 2 background-repeat:repeat" |
| 3 onload="SetPluginSize(400, 400)"> |
| 4 |
| 5 <script type="text/javascript"> |
| 6 isPluginDefaultSize = true; |
| 7 |
| 8 function Test() { |
| 9 plugin = document.getElementById('plugin'); |
| 10 // Confirm that this no longer segfaults. |
| 11 alert(plugin.toString(new Array(10))); |
| 12 } |
| 13 |
| 14 function SetPluginSize(width, height) { |
| 15 plugin = document.getElementById('plugin'); |
| 16 size = document.getElementById('size'); |
| 17 plugin.width = width; |
| 18 plugin.height = height; |
| 19 size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width; |
| 20 } |
| 21 |
| 22 function ToggleSize() { |
| 23 if (!isPluginDefaultSize) { |
| 24 SetPluginSize(400, 400); |
| 25 isPluginDefaultSize = true; |
| 26 } else { |
| 27 SetPluginSize(1000, 800); |
| 28 isPluginDefaultSize = false; |
| 29 } |
| 30 } |
| 31 </script> |
| 32 |
| 33 <button onclick='Test()'>Test</button> |
| 34 <button onclick='ToggleSize()'>Toggle Size</button> |
| 35 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi
dth:200px;">FPS GOES HERE</div> |
| 36 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w
idth:200px;"></div> |
| 37 <object id="plugin" src="http://www.google.com/" type="application/browser-plu
gin" width="400" height="400" border="2px"></object> |
| 38 <object id="plugin2" src="http://www.chromium.org/"type="application/browser-p
lugin" width="640" height="480" border="2px"></object> |
| 39 <hr> |
| 40 </body> |
OLD | NEW |