blob: d22661a20f66ce70778c89719929e57d7292c677 [file] [log] [blame]
<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) {
var detail = e.detail ? JSON.parse(e.detail) : {};
plugin['-internal-attach'](detail.windowId, {});
});
</script>
</body>
</html>