Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <script type="text/javascript"> | 1 <script type="text/javascript"> |
| 2 function loadAbort(evt) { | 2 function loadAbort(evt) { |
| 3 document.title = evt.type; | 3 document.title = evt.type; |
| 4 } | 4 } |
| 5 function loadStart(evt) { | 5 function loadStart(evt) { |
| 6 document.title = evt.url; | 6 document.title = evt.url; |
| 7 } | 7 } |
| 8 function loadStop(evt) { | |
| 9 document.title = "loadStop"; | |
| 10 } | |
| 11 | |
| 12 var isTopLevel; | |
|
Charlie Reis
2012/10/11 18:55:28
nit: commitIsTopLevel.
(There are isTopLevel prope
irobert
2012/10/11 20:45:49
Done.
| |
| 13 function loadCommit(evt) { | |
| 14 document.title = evt.url; | |
|
Charlie Reis
2012/10/11 18:55:28
We can't distinguish between this and loadStart.
irobert
2012/10/11 20:45:49
I use "loadCommit:" as the prefix and plus the url
| |
| 15 isTopLevel = evt.isTopLevel; | |
| 16 } | |
| 17 | |
| 8 var redirectOldUrl; | 18 var redirectOldUrl; |
| 9 var redirectNewUrl; | 19 var redirectNewUrl; |
| 10 function loadRedirect(event) { | 20 function loadRedirect(event) { |
| 11 document.title = "redirected"; | 21 document.title = "redirected"; |
| 12 if (event.isTopLevel) { | 22 if (event.isTopLevel) { |
| 13 redirectOldUrl = event.oldUrl; | 23 redirectOldUrl = event.oldUrl; |
| 14 redirectNewUrl = event.newUrl; | 24 redirectNewUrl = event.newUrl; |
| 15 } | 25 } |
| 16 } | 26 } |
| 17 function SetSrc(src) { | 27 function SetSrc(src) { |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 46 type="application/browser-plugin" | 56 type="application/browser-plugin" |
| 47 width="640" | 57 width="640" |
| 48 height="480" | 58 height="480" |
| 49 border="0px"></object> | 59 border="0px"></object> |
| 50 | 60 |
| 51 <script> | 61 <script> |
| 52 var plugin = document.getElementById('plugin'); | 62 var plugin = document.getElementById('plugin'); |
| 53 plugin.addEventListener('loadStart', loadStart); | 63 plugin.addEventListener('loadStart', loadStart); |
| 54 plugin.addEventListener('loadAbort', loadAbort); | 64 plugin.addEventListener('loadAbort', loadAbort); |
| 55 plugin.addEventListener('loadRedirect', loadRedirect); | 65 plugin.addEventListener('loadRedirect', loadRedirect); |
| 66 plugin.addEventListener('loadStop', loadStop); | |
| 67 plugin.addEventListener('loadCommit', loadCommit); | |
| 56 </script> | 68 </script> |
| OLD | NEW |