HTML5 MathML
HTML5 MathML <maction> Tag
The <maction> tag binds an action - such as toggling between alternative expressions - to a portion of a MathML formula. It was designed for interactive notation, controlled by its actiontype attribute.
Definition and usage
The <maction> element attaches interactive behaviour to the mathematics it contains. The kind of behaviour is chosen with the actiontype attribute, for example toggle to cycle through child expressions on click, or statusline to show a message. It is primarily of historical interest, as MathML Core no longer requires browsers to implement its behaviour.
Syntax
<maction actiontype="toggle" selection="1">
<!-- child expressions -->
</maction>Example
<math>
<maction actiontype="toggle" selection="1">
<mfrac><mn>1</mn><mn>2</mn></mfrac>
<mn>0.5</mn>
</maction>
</math>Here the selection attribute picks which child is shown first (1 = the fraction). When actiontype is toggle, clicking the expression cycles to the next child.
MathML Core does not define interactive behaviour for <maction>. Modern browsers render only the selected child and ignore the interaction, so do not rely on it for essential functionality.
