OLD | NEW |
---|---|
(Empty) | |
1 <textarea id='id_message'> | |
2 </textarea> | |
3 | |
4 <object id="plugin" | |
5 tabindex="0" | |
dcheng
2012/10/11 20:11:51
Nit: Do we need to explicitly set a tabindex?
sadrul
2012/10/11 20:41:21
I believe tabindex is necessary to be able to tab-
| |
6 type="application/browser-plugin" | |
7 width="240" | |
8 height="120" | |
9 border="0px" | |
10 style='border: solid 1px red' | |
dcheng
2012/10/11 20:11:51
Nit: It seems like line 10 cancels out line 9?
sadrul
2012/10/11 20:41:21
Done.
| |
11 contentEditable | |
12 > | |
13 </object> | |
14 | |
15 <script> | |
16 function dragLocation() { | |
17 return [id_message.offsetLeft + 10, | |
18 id_message.offsetTop + 5]; | |
dcheng
2012/10/11 20:11:51
Nit: For uniformity, it'd be nice to use offsetWid
sadrul
2012/10/11 20:41:21
Done.
| |
19 } | |
20 | |
21 function dropLocation() { | |
22 return [plugin.offsetLeft + plugin.offsetWidth / 2, | |
23 plugin.offsetTop + plugin.offsetHeight / 2]; | |
24 } | |
25 | |
26 function SetSrc(src) { | |
dcheng
2012/10/11 20:11:51
Nit: This inconsistent naming is wonky. I guess th
sadrul
2012/10/11 20:41:21
Indeed. I have kept it as it is for now. But it is
| |
27 plugin = document.getElementById('plugin'); | |
28 plugin.src = src; | |
29 } | |
30 </script> | |
OLD | NEW |