// Copyright 2017-2022 The MathJax Consortium
// SPDX-License-Identifier: Apache-2.0
// This file is a Go translation and modification of MathJax 3.2.2.

package svg

// errorToSVG ports SVGmerror.toSVG.  In addition to its content, merror
// carries a yellow background rectangle and exposes the TeX parser's message
// through data-mjx-error.
func ( *wrapper) ( *Element) {
	 := .standardSVG()
	if  := stringAttributeExplicit(.node, "data-mjx-error");  != "" {
		.SetAttr("data-mjx-error", )
	}
	 := .getBBox()
	.Append(NewElement("rect").
		SetAttr("data-background", "true").
		SetAttr("width", fixed(.W)).
		SetAttr("height", fixed(.H+.D)).
		SetAttr("y", fixed(-.D)))
	if  := stringAttribute(.node, "title", "");  != "" {
		.Append(NewElement("title", Text()))
	}
	.addChildren()
}