haikuwebkit/LayoutTests/mathml/presentation/msub-sub-changed.xhtml

20 lines
536 B
HTML

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>msub javascript subscript change test</title>
</head>
<body>
<p>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<msub id="sub"><mi>x</mi><mn>1</mn></msub>
</math>
</p>
<script type='text/javascript'>
var msub = document.getElementById("sub");
msub.removeChild(msub.firstChild.nextSibling);
var sub = document.createElementNS("http://www.w3.org/1998/Math/MathML","mn");
sub.appendChild(document.createTextNode("2"));
msub.appendChild(sub);
</script>
</body>
</html>