summaryrefslogtreecommitdiffstats
path: root/content/test/data/browser_plugin_dragging.html
blob: cecfd1447ec356d7dd36ed4691ade2fcd56b4e6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<textarea id='id_message'>
</textarea>

<object id="plugin"
    tabindex="0"
    type="application/browser-plugin"
    width="240"
    height="120"
    style='border: solid 1px red'
    contentEditable
    >
</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;
}
</script>