www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2756525e7312e53a6b9c5c2936101c9be58aab3c
parent c2ef3d9312e371f7f9e6139b10a5cc518ba17d11
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sat, 12 Sep 2015 06:58:06 -0400

Make sure aria attributes use setAttribute so they appear properly in the DOM

Diffstat:
Munpacked/MathJax.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js @@ -1048,10 +1048,11 @@ MathJax.HTML = { {def.style[id.replace(/-([a-z])/g,this.ucMatch)] = style[id]}} } MathJax.Hub.Insert(obj,def); + for (var id in def) {if (id.substr(0,5) === "aria-") obj.setAttribute(id,def[id])} } if (contents) { if (!(contents instanceof Array)) {contents = [contents]} - for (var i = 0; i < contents.length; i++) { + for (var i = 0, m = contents.length; i < m; i++) { if (contents[i] instanceof Array) { obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2])); } else if (type === "script") { // IE throws an error if script is added as a text node