frac-created-dynamically-4.html (1111B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <title>mfrac childnode update</title> 5 <link rel="help" href="https://w3c.github.io/mathml-core/#fractions-mfrac"> 6 <meta name="assert" content="A dynamically created mfrac should render like the equivalent markup."> 7 <link rel="match" href="frac-created-dynamically-4-ref.html"> 8 <script type="text/javascript"> 9 function doTest() { 10 var x = document.getElementById("innerMfrac"); 11 var y = document.createElementNS("http://www.w3.org/1998/Math/MathML","mi"); 12 var z = document.createElementNS("http://www.w3.org/1998/Math/MathML","mi"); 13 y.innerHTML = "c"; 14 z.innerHTML = "d"; 15 x.appendChild(y); 16 x.appendChild(z); 17 document.documentElement.removeAttribute("class"); 18 } 19 window.addEventListener("TestRendered",doTest); 20 </script> 21 </head> 22 <body> 23 <math> 24 <mfrac style="font-size: 300%"> 25 <mfrac> 26 <mi>a</mi> 27 <mi>b</mi> 28 </mfrac> 29 <mfrac id="innerMfrac"> 30 </mfrac> 31 </mfrac> 32 </math> 33 </body> 34 </html>