| 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.detail.reason; |
| 4 } | 4 } |
| 5 function loadStart(evt) { | 5 function loadStart(evt) { |
| 6 document.title = evt.url; | 6 document.title = evt.detail.url; |
| 7 } | 7 } |
| 8 function loadStop(evt) { | 8 function loadStop(evt) { |
| 9 document.title = "loadStop"; | 9 document.title = "loadStop"; |
| 10 } | 10 } |
| 11 | 11 |
| 12 var commitIsTopLevel; | 12 var commitIsTopLevel; |
| 13 function loadCommit(evt) { | 13 function loadCommit(evt) { |
| 14 document.title = "loadCommit:" + evt.url; | 14 document.title = "loadCommit:" + evt.detail.url; |
| 15 commitIsTopLevel = evt.isTopLevel; | 15 commitIsTopLevel = evt.detail.isTopLevel; |
| 16 } | 16 } |
| 17 | 17 |
| 18 var redirectOldUrl; | 18 var redirectOldUrl; |
| 19 var redirectNewUrl; | 19 var redirectNewUrl; |
| 20 function loadRedirect(event) { | 20 function loadRedirect(event) { |
| 21 document.title = "redirected"; | 21 document.title = "redirected"; |
| 22 if (event.isTopLevel) { | 22 if (event.detail.isTopLevel) { |
| 23 redirectOldUrl = event.oldUrl; | 23 redirectOldUrl = event.detail.oldUrl; |
| 24 redirectNewUrl = event.newUrl; | 24 redirectNewUrl = event.detail.newUrl; |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 function SetSrc(src) { | 27 function SetSrc(src) { |
| 28 var plugin = document.getElementById('plugin'); | 28 var plugin = document.getElementById('plugin'); |
| 29 plugin.src = src; | 29 plugin.src = src; |
| 30 } | 30 } |
| 31 function SetSize(w, h) { | 31 function SetSize(w, h) { |
| 32 var plugin = document.getElementById('plugin'); | 32 var plugin = document.getElementById('plugin'); |
| 33 plugin.width = w; | 33 plugin.width = w; |
| 34 plugin.height = h; | 34 plugin.height = h; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } else { | 88 } else { |
| 89 var name = msg.replace("stop_ack", "").trim(); | 89 var name = msg.replace("stop_ack", "").trim(); |
| 90 if (name !== '') { | 90 if (name !== '') { |
| 91 window.document.title = name; | 91 window.document.title = name; |
| 92 } else { | 92 } else { |
| 93 window.document.title = 'main guest'; | 93 window.document.title = 'main guest'; |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 var plugin = document.getElementById('plugin'); | 97 var plugin = document.getElementById('plugin'); |
| 98 plugin.addEventListener('loadstart', loadStart); | 98 plugin.addEventListener('-internal-loadstart', loadStart); |
| 99 plugin.addEventListener('loadabort', loadAbort); | 99 plugin.addEventListener('-internal-loadabort', loadAbort); |
| 100 plugin.addEventListener('loadredirect', loadRedirect); | 100 plugin.addEventListener('-internal-loadredirect', loadRedirect); |
| 101 window.addEventListener('message', receiveMessage, false); | 101 window.addEventListener('message', receiveMessage, false); |
| 102 plugin.addEventListener('loadstop', loadStop); | 102 plugin.addEventListener('-internal-loadstop', loadStop); |
| 103 plugin.addEventListener('loadcommit', loadCommit); | 103 plugin.addEventListener('-internal-loadcommit', loadCommit); |
| 104 </script> | 104 </script> |
| OLD | NEW |