mirror of
https://github.com/servo/servo.git
synced 2025-07-12 09:53:40 +01:00
27 lines
822 B
HTML
27 lines
822 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>mfrac created dynamically</title>
|
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mfrac">
|
|
<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
|
|
<link rel="match" href="frac-created-dynamically-3-ref.html">
|
|
<script>
|
|
window.addEventListener("DOMContentLoaded", function() {
|
|
var mi3 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mi");
|
|
mi3.appendChild(document.createTextNode("3"));
|
|
document.getElementsByTagName("mfrac")[0].appendChild(mi3);
|
|
document.getElementById("mi2").remove();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>This test passes if you see a fraction 1/3.</p>
|
|
<math>
|
|
<mfrac>
|
|
<mi>1</mi>
|
|
<mi id="mi2">2</mi>
|
|
</mfrac>
|
|
</math>
|
|
</body>
|
|
</html>
|