From 054528edde9b7de02a6da85f40b0674588091f04 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 17 Sep 2017 10:56:03 +0300 Subject: [PATCH] apply: SVG className workaround --- content/apply.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/apply.js b/content/apply.js index c93ebc7d..b28fd434 100644 --- a/content/apply.js +++ b/content/apply.js @@ -249,10 +249,11 @@ function applySections(styleId, code) { } Object.assign(el, { id: ID_PREFIX + styleId, - className: 'stylus', type: 'text/css', textContent: code, }); + // SVG className is not a string, but an instance of SVGAnimatedString + el.classList.add('stylus'); addStyleElement(el); styleElements.set(el.id, el); disabledElements.delete(Number(styleId));