Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>dynamic maction 1</title> |
michael@0 | 4 | </head> |
michael@0 | 5 | |
michael@0 | 6 | <body> |
michael@0 | 7 | |
michael@0 | 8 | <p> |
michael@0 | 9 | <math> |
michael@0 | 10 | <maction id="m1" actiontype="toggle"> |
michael@0 | 11 | <mtext>__1__</mtext> |
michael@0 | 12 | <mtext>__2__</mtext> |
michael@0 | 13 | </maction> |
michael@0 | 14 | </math> |
michael@0 | 15 | </p> |
michael@0 | 16 | |
michael@0 | 17 | <p> |
michael@0 | 18 | <math> |
michael@0 | 19 | <maction id="m2" actiontype="toggle" selection="2"> |
michael@0 | 20 | <mtext>__1__</mtext> |
michael@0 | 21 | <mtext>__2__</mtext> |
michael@0 | 22 | </maction> |
michael@0 | 23 | </math> |
michael@0 | 24 | </p> |
michael@0 | 25 | |
michael@0 | 26 | <p> |
michael@0 | 27 | <math> |
michael@0 | 28 | <maction id="m3" actiontype="toggle" selection="2"> |
michael@0 | 29 | <mtext>__1__</mtext> |
michael@0 | 30 | <mtext>__2__</mtext> |
michael@0 | 31 | </maction> |
michael@0 | 32 | </math> |
michael@0 | 33 | </p> |
michael@0 | 34 | |
michael@0 | 35 | <p> |
michael@0 | 36 | <math> |
michael@0 | 37 | <maction id="m4" actiontype="toggle"> |
michael@0 | 38 | <mn>1</mn> |
michael@0 | 39 | <mn>2</mn> |
michael@0 | 40 | </maction> |
michael@0 | 41 | </math> |
michael@0 | 42 | </p> |
michael@0 | 43 | |
michael@0 | 44 | <p> |
michael@0 | 45 | <math> |
michael@0 | 46 | <maction id="m5" actiontype="toggle"> |
michael@0 | 47 | <mtext id="m51">__1__</mtext> |
michael@0 | 48 | <mtext id="m52">__2__</mtext> |
michael@0 | 49 | <mtext id="m53">__3__</mtext> |
michael@0 | 50 | </maction> |
michael@0 | 51 | </math> |
michael@0 | 52 | </p> |
michael@0 | 53 | |
michael@0 | 54 | <p> |
michael@0 | 55 | <math> |
michael@0 | 56 | <maction id="m6" actiontype="toggle" selection="3"> |
michael@0 | 57 | <mtext>__1__</mtext> |
michael@0 | 58 | <mtext>__2__</mtext> |
michael@0 | 59 | </maction> |
michael@0 | 60 | </math> |
michael@0 | 61 | </p> |
michael@0 | 62 | |
michael@0 | 63 | <p> |
michael@0 | 64 | <math> |
michael@0 | 65 | <maction id="m7" actiontype="toggle"> |
michael@0 | 66 | <mtext id="m71">__1__</mtext> |
michael@0 | 67 | <mtext id="m72">__2__</mtext> |
michael@0 | 68 | </maction> |
michael@0 | 69 | </math> |
michael@0 | 70 | </p> |
michael@0 | 71 | |
michael@0 | 72 | <p> |
michael@0 | 73 | <math> |
michael@0 | 74 | <maction id="m8" actiontype="toggle"> |
michael@0 | 75 | <mtext id="m81">__1__</mtext> |
michael@0 | 76 | <mtext id="m82">__2__</mtext> |
michael@0 | 77 | </maction> |
michael@0 | 78 | </math> |
michael@0 | 79 | </p> |
michael@0 | 80 | |
michael@0 | 81 | <script> |
michael@0 | 82 | function doTest() { |
michael@0 | 83 | document.getElementById("m1").setAttribute("selection", "2"); |
michael@0 | 84 | document.getElementById("m2").removeAttribute("selection"); |
michael@0 | 85 | document.getElementById("m3").setAttribute("actiontype", "statusline"); |
michael@0 | 86 | document.getElementById("m4").setAttribute("actiontype", "statusline"); |
michael@0 | 87 | |
michael@0 | 88 | var child51 = document.getElementById("m51"); |
michael@0 | 89 | document.getElementById("m5").removeChild(child51); |
michael@0 | 90 | |
michael@0 | 91 | var child53 = document.getElementById("m53"); |
michael@0 | 92 | document.getElementById("m6").appendChild(child53.cloneNode(true)); |
michael@0 | 93 | |
michael@0 | 94 | var child71 = document.getElementById("m71"); |
michael@0 | 95 | document.getElementById("m7").insertBefore(child53.cloneNode(true), child71); |
michael@0 | 96 | |
michael@0 | 97 | var child81 = document.getElementById("m81"); |
michael@0 | 98 | document.getElementById("m8").replaceChild(child53.cloneNode(true), child81); |
michael@0 | 99 | |
michael@0 | 100 | document.documentElement.removeAttribute('class'); |
michael@0 | 101 | } |
michael@0 | 102 | window.addEventListener("MozReftestInvalidate", doTest, false); |
michael@0 | 103 | </script> |
michael@0 | 104 | |
michael@0 | 105 | </body> |
michael@0 | 106 | </html> |