haikuwebkit/LayoutTests/mathml/presentation/msup-sup-changed.xhtml

20 lines
538 B
HTML

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