From f4c4f20b80f99a3ee6935df0f1653f4933e6c030 Mon Sep 17 00:00:00 2001 From: Joel Martinez Date: Fri, 17 Jun 2016 10:19:04 -0700 Subject: [PATCH] Automated g4 rollback of changelist 116605936. *** Reason for rollback *** Broke installing CSS installation in Safari (see bug b/29340337) *** Original change description *** Use goog.dom.setTextContent instead of innerHTML in goog.style.setStyles. RELNOTES: n/a *** ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125177116 --- closure/goog/style/style.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/closure/goog/style/style.js b/closure/goog/style/style.js index 1e752187a7..93cf505986 100644 --- a/closure/goog/style/style.js +++ b/closure/goog/style/style.js @@ -1374,11 +1374,10 @@ goog.style.setSafeStyleSheet = function(element, safeStyleSheet) { // selector was invalid or there were CSS comments. Setting the cssText of // the style node works fine and ignores CSS that IE doesn't understand. // However IE >= 11 doesn't support cssText any more, so we make sure that - // cssText is a defined property and otherwise fall back to setTextContent. + // cssText is a defined property and otherwise fall back to innerHTML. element.cssText = stylesString; } else { - // NOTE: We could also set textContent directly here. - goog.dom.setTextContent(/** @type {!Element} */ (element), stylesString); + element.innerHTML = stylesString; } };