IE10 does not support classList on SVG elements m(

This commit is contained in:
Martin Zimmermann 2013-10-30 00:24:32 +01:00
parent 32f83160d6
commit 1518bae5ba
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ define(["app/text/html", "app/dom", "app/utils", "app/api", "app/markup", "app/i
// on text area focus, generate identicon from IP address
$(".textarea-wrapper > textarea", el).on("focus", function() {
if ($(".avatar svg", el).classList.contains("blank")) {
if ($(".avatar svg", el).getAttribute("className") === "blank") {
$(".avatar svg", el).replace(
lib.identicons.generate(lib.pbkdf2(api.remote_addr, api.salt, 1000, 6), 4, 48));
}

View File

@ -111,7 +111,7 @@ define(["q"], function(Q) {
].join(""), 2).toString(16);
var el = generateIdenticon(blank, height, width);
el.classList.add("blank");
el.setAttribute("className", "blank"); // IE10 does not support classList on SVG elements, duh.
return el;
};