From 637d4a2087b9e93ccd47d689411887b6c40c3992 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 18 Jul 2021 13:43:11 -0400 Subject: Pronunciation template helper (#1840) * Rename field * Set up pronunication components * Fix documentation * Rename function * Update test dependencies * Fix constructor * Log errors * Add pronunciation helper * Add styleApplier argument to _getHtml/_normalizeHtml * Use getAttribute for 'class' to support namespaced elements (e.g. svg) * Update format name * Add optional tag * Update docs --- ext/js/dom/sandbox/css-style-applier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/dom') diff --git a/ext/js/dom/sandbox/css-style-applier.js b/ext/js/dom/sandbox/css-style-applier.js index c617fead..84b8450b 100644 --- a/ext/js/dom/sandbox/css-style-applier.js +++ b/ext/js/dom/sandbox/css-style-applier.js @@ -54,7 +54,7 @@ class CssStyleApplier { applyClassStyles(elements) { const elementStyles = []; for (const element of elements) { - const {className} = element; + const className = element.getAttribute('class'); if (className.length === 0) { continue; } let cssTextNew = ''; for (const {selectorText, styles} of this._getRulesForClass(className)) { -- cgit v1.2.3