Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
| 3 <title>Initial Title</title> | |
| 4 <script> | |
| 5 function PluginCreated() { | |
| 6 document.title = "Loaded"; | |
| 7 } | |
| 8 | |
| 9 function injectPlugin() { | |
| 10 var child = document.createElement('div'); | |
| 11 child.innerHTML = '<embed type="application/vnd.npapi-test" src="foo" name ="invoke_js_function_on_create" id="plugin" mode="np_embed"></embed>'; | |
| 12 document.getElementById('content').appendChild(child); | |
| 13 } | |
| 14 | |
| 15 function notloaded() { | |
| 16 document.title = "Not Loaded"; | |
| 17 } | |
| 18 | |
| 19 function OnLoad() { | |
| 20 setTimeout(function(){injectPlugin()}, 1000); | |
| 21 setTimeout(function(){notloaded()}, 2000); | |
|
jam
2014/10/16 22:10:57
this seems flaky? what if it takes the plugin proc
Will Harris
2014/10/17 18:57:08
I changed this to call into the plugin directly us
| |
| 22 } | |
| 23 </script> | |
| 24 </head> | |
| 25 <body onload='OnLoad();'> | |
| 26 <div id='content'></div> | |
| 27 </embed> | |
| 28 </body> | |
| 29 </html> | |
| OLD | NEW |