tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

dynamic-mrow-like-001.html (3598B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Dynamic mrow-like elements</title>
      6 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
      7 <link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow">
      8 <script src="/mathml/support/mathml-fragments.js"></script>
      9 <meta name="assert" content="Dynamically set children of mrow-like elements.">
     10 <style>
     11  math {
     12      font: 25px/1 Ahem;
     13      background: lightblue;
     14  }
     15  li {
     16      padding: 2px;
     17  }
     18 </style>
     19 <link rel="match" href="dynamic-mrow-like-001-ref.html">
     20 <script>
     21  window.addEventListener("load", function() {
     22 
     23      // force initial layout so we're sure what we're testing against
     24      document.documentElement.getBoundingClientRect();
     25 
     26      Array.from(document.getElementsByClassName("testedElement")).forEach(e => {
     27          if (e.children.length == 0) {
     28              // Add 3 children.
     29              let mn = FragmentHelper.createElement("mn");
     30              mn.textContent = "X";
     31              e.appendChild(mn);
     32              mn = FragmentHelper.createElement("mn");
     33              mn.textContent = "\u00C9";
     34              e.appendChild(mn);
     35              mn = FragmentHelper.createElement("mn");
     36              mn.textContent = "p";
     37              e.insertBefore(mn, e.lastElementChild);
     38          } else {
     39              // Remove last child.
     40              e.removeChild(e.lastElementChild);
     41          }
     42      });
     43 
     44      document.documentElement.classList.remove('reftest-wait');
     45  });
     46 </script>
     47 </head>
     48 <body>
     49  <ol>
     50    <li><math class="testedElement"></math></li>
     51    <li><math class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></math></li>
     52    <li><math><mrow class="testedElement"></mrow></math></li>
     53    <li><math><mrow class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></mrow></math></li>
     54    <li><math><maction class="testedElement"></maction></math></li>
     55    <li><math><maction class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></maction></math></li>
     56    <li><math><merror class="testedElement"></merror></math></li>
     57    <li><math><merror class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></merror></math></li>
     58    <li><math><mphantom class="testedElement"></mphantom></math></li>
     59    <li><math><mphantom class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></mphantom></math></li>
     60    <li><math><mstyle class="testedElement"></mstyle></math></li>
     61    <li><math><mstyle class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></mstyle></math></li>
     62    <li><math><semantics class="testedElement"></semantics></math></li>
     63    <li><math><semantics class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></semantics></math></li>
     64    <li><math><unknown class="testedElement"></unknown></math></li>
     65    <li><math><unknown class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></unknown></math></li>
     66    <li><math><none class="testedElement"></none></math></li>
     67    <li><math><none class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></none></math></li>
     68    <li><math><mprescripts class="testedElement"></mprescripts></math></li>
     69    <li><math><mprescripts class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></mprescripts></math></li>
     70    <li><math><mfenced class="testedElement"></mfenced></math></li>
     71    <li><math><mfenced class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></mfenced></math></li>
     72    <li><math><a class="testedElement"></a></math></li>
     73    <li><math><a class="testedElement"><mn>X</mn><mn>p</mn><mn>&#x00C9;</mn></a></math></li>
     74  </ol>
     75 </body>
     76 </html>