Fixed CHTML.addElement to be able to create non-span elements (e.g., the <a> needed for href attributes)

This commit is contained in:
Davide P. Cervone 2015-09-12 14:23:35 -04:00
parent 17e02d710c
commit 0412d8ec7e

View File

@ -324,8 +324,9 @@
if (type.substr(0,4) === "mjx-") {
if (!def) def = {};
if (def.className) def.className = type+" "+def.className; else def.className = type;
type = "span";
}
return this.HTMLElement("span",def,content);
return this.HTMLElement(type,def,content);
},
addElement: function (node,type,def,content) {
return node.appendChild(this.Element(type,def,content));