<html> <head></head> <body> <textarea id='id_message'> </textarea> <object id="plugin" tabindex="0" type="application/browser-plugin" width="240" height="120" style='border: solid 1px red' > </object> <script> function dragLocation() { return [id_message.offsetLeft + id_message.offsetWidth / 2, id_message.offsetTop + id_message.offsetHeight / 2]; } function dropLocation() { return [plugin.offsetLeft + plugin.offsetWidth / 2, plugin.offsetTop + plugin.offsetHeight / 2]; } function SetSrc(src) { plugin = document.getElementById('plugin'); plugin.src = src; } var plugin = document.getElementById('plugin'); plugin.addEventListener('-internal-instanceid-allocated', function(e) { plugin['-internal-attach']({}); }); </script> </body> </html>