<html> <head> <script type="text/javascript"> function SetSrc(src) { plugin = document.getElementById('plugin'); plugin.src = src; } </script> </head> <body> <button id="before" tabindex="0">Before</button> <object id="plugin" tabindex="0" type="application/browser-plugin" width="640" height="480" border="0px"></object> <button id="after" tabindex="0">After</button> <script type="text/javascript"> var plugin = document.getElementById('plugin'); plugin.addEventListener('-internal-instanceid-allocated', function(e) { plugin['-internal-attach']({}); }); </script> </body> </html>