• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head></head>
3<body>
4
5<textarea id='id_message'>
6</textarea>
7
8<object id="plugin"
9    tabindex="0"
10    type="application/browser-plugin"
11    width="240"
12    height="120"
13    style='border: solid 1px red'
14    >
15</object>
16
17<script>
18function dragLocation() {
19  return [id_message.offsetLeft + id_message.offsetWidth / 2,
20          id_message.offsetTop + id_message.offsetHeight / 2];
21}
22
23function dropLocation() {
24  return [plugin.offsetLeft + plugin.offsetWidth / 2,
25          plugin.offsetTop + plugin.offsetHeight / 2];
26}
27
28function SetSrc(src) {
29  plugin = document.getElementById('plugin');
30  plugin.src = src;
31}
32
33var plugin = document.getElementById('plugin');
34plugin.addEventListener('-internal-instanceid-allocated', function(e) {
35  plugin['-internal-attach']({});
36});
37</script>
38
39</body>
40</html>
41