code: function GetMML(result) {
    if (!data.mml && !data.mmlNode) return;
    var jax = MathJax.Hub.getAllJax()[0];
    if (data.speakText && !jax.root.alttext) {
      jax.root.alttext = result.speakText;
      var attrNames = jax.root.attrNames;
      if (attrNames && attrNames.indexOf("alttext") === -1) {
        attrNames.push("alttext");
      }
    }
    try {
      var mml = jax.root.toMathML('',jax);
    } catch(err) {
      if (!err.restart) {throw err;} // an actual error
      return MathJax.Callback.After(window.Array(GetMML,result),err.restart);
    }
    if (data.mml) result.mml = mml;
    if (data.mmlNode) result.mmlNode = JSDOM.fragment(mml).firstChild;
  }
docs: Creates the MathML output (taking MathJax resets into account)