<div>
<math>
<msup id="equation" data-value="-1" data-equation="euler">
<mi>e</mi>
<mrow><mi>i</mi> <mi>π</mi></mrow>
</msup>
<mo>+</mo>
<mn>1</mn>
<mo>=</mo>
<mn>0</mn>
</math>
</div>MathMLElement: dataset property / notebook
MathMLElement: dataset property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const el = document.querySelector("#equation");
console.log(el.dataset.value); // "-1"
console.log(el.dataset.equation); // "euler"