Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
1 <!DOCTYPE html>
2 <html>
3 <select style="position: relative" size=4>
4 <option>bar</option>
5 </select>
6 <select style="position: relative">
7 <option>bar</option>
8 </select>
9 <script>
10 function injectAbsPosKid(s) {
11 var option = document.createElement("option");
12 option.appendChild(document.createTextNode("foo"));
13 option.style.position = "absolute";
14 option.style.top = "100px";
15 s.insertBefore(option, s.firstChild);
17 var div = document.createElement("div");
18 div.appendChild(document.createTextNode("bar"));
19 div.style.position = "absolute";
20 div.style.top = "200px";
21 s.appendChild(div);
22 }
23 onload = function() {
24 var s1 = document.querySelectorAll("select")[0];
25 var s2 = document.querySelectorAll("select")[1];
26 injectAbsPosKid(s1);
27 injectAbsPosKid(s2);
28 s2.selectedIndex = 0;
29 };
30 </script>
31 </html>