Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
2 <head>
3 <title>dynamic maction 2</title>
4 </head>
6 <body>
8 <p>
9 <math>
10 <maction id="m1" actiontype="statusline">
11 <mtext>__1__</mtext>
12 <mtext>__2__</mtext>
13 </maction>
14 </math>
15 </p>
17 <p>
18 <math>
19 <maction id="m2" actiontype="statusline" selection="2">
20 <mtext>__1__</mtext>
21 <mtext>__2__</mtext>
22 </maction>
23 </math>
24 </p>
26 <p>
27 <math>
28 <maction id="m3" actiontype="statusline" selection="2">
29 <mtext>__1__</mtext>
30 <mtext>__2__</mtext>
31 </maction>
32 </math>
33 </p>
35 <p>
36 <math>
37 <maction id="m4" actiontype="statusline">
38 <mtext id="m41">__1__</mtext>
39 <mtext id="m42">__2__</mtext>
40 <mtext id="m43">__3__</mtext>
41 </maction>
42 </math>
43 </p>
45 <p>
46 <math>
47 <maction id="m5" actiontype="statusline">
48 <mtext>__1__</mtext>
49 </maction>
50 </math>
51 </p>
53 <p>
54 <math>
55 <maction id="m6" actiontype="statusline">
56 <mtext id="m61">__1__</mtext>
57 <mtext id="m62">__2__</mtext>
58 </maction>
59 </math>
60 </p>
62 <p>
63 <math>
64 <maction id="m7" actiontype="statusline">
65 <mtext id="m71">__1__</mtext>
66 <mtext id="m72">__2__</mtext>
67 </maction>
68 </math>
69 </p>
71 <script>
72 function doTest() {
73 document.getElementById("m1").setAttribute("selection", "2");
74 document.getElementById("m2").removeAttribute("selection");
75 document.getElementById("m3").setAttribute("actiontype", "toggle");
77 var child41 = document.getElementById("m41");
78 document.getElementById("m4").removeChild(child41);
80 var child43 = document.getElementById("m43");
81 document.getElementById("m5").appendChild(child43.cloneNode(true));
83 var child61 = document.getElementById("m61");
84 document.getElementById("m6").insertBefore(child43.cloneNode(true), child61);
86 var child71 = document.getElementById("m71");
87 document.getElementById("m7").replaceChild(child43.cloneNode(true), child71);
89 document.documentElement.removeAttribute('class');
90 }
91 window.addEventListener("MozReftestInvalidate", doTest, false);
92 </script>
94 </body>
95 </html>