summaryrefslogtreecommitdiffstats
path: root/content/test/data/browser_plugin_dragging.html
blob: 80cc14b820543a6acdb25892ca495af28a5e00ee (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
30
31
32
33
34
35
36
37
38
39
40
<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>