Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <script type="text/javascript"> | 1 <script type="text/javascript"> |
| 2 var url; | |
|
Charlie Reis
2012/10/03 01:52:30
nit: loadStartUrl
That will make the test more obv
Fady Samuel
2012/10/04 00:43:38
Done.
| |
| 3 function loadStart(event) { | |
| 4 url = event.url; | |
| 5 } | |
| 2 function SetSrc(src) { | 6 function SetSrc(src) { |
| 3 var plugin = document.getElementById('plugin'); | 7 var plugin = document.getElementById('plugin'); |
| 4 plugin.src = src; | 8 plugin.src = src; |
| 9 plugin.addEventListener('loadStart', loadStart); | |
| 5 } | 10 } |
| 6 function SetSize(w, h) { | 11 function SetSize(w, h) { |
| 7 var plugin = document.getElementById('plugin'); | 12 var plugin = document.getElementById('plugin'); |
| 8 plugin.width = w; | 13 plugin.width = w; |
| 9 plugin.height = h; | 14 plugin.height = h; |
| 10 } | 15 } |
| 11 function Back() { | 16 function Back() { |
| 12 var plugin = document.getElementById('plugin'); | 17 var plugin = document.getElementById('plugin'); |
| 13 plugin.back(); | 18 plugin.back(); |
| 14 } | 19 } |
| 15 function Forward() { | 20 function Forward() { |
| 16 var plugin = document.getElementById('plugin'); | 21 var plugin = document.getElementById('plugin'); |
| 17 plugin.forward(); | 22 plugin.forward(); |
| 18 } | 23 } |
| 19 function Go(relativeIndex) { | 24 function Go(relativeIndex) { |
| 20 var plugin = document.getElementById('plugin'); | 25 var plugin = document.getElementById('plugin'); |
| 21 plugin.go(relativeIndex); | 26 plugin.go(relativeIndex); |
| 22 } | 27 } |
| 28 | |
|
Charlie Reis
2012/10/03 01:52:30
nit: Remove. (No need for extra code churn.)
Fady Samuel
2012/10/04 00:43:38
Done.
| |
| 23 </script> | 29 </script> |
| 24 | 30 |
| 25 <object id="plugin" | 31 <object id="plugin" |
| 26 tabindex="0" | 32 tabindex="0" |
| 27 type="application/new-browser-plugin" | 33 type="application/new-browser-plugin" |
| 28 width="640" | 34 width="640" |
| 29 height="480" | 35 height="480" |
| 30 border="0px"></object> | 36 border="0px"></object> |
| OLD | NEW |