Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Automated g4 rollback of changelist 116605936.
Browse files Browse the repository at this point in the history
*** 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
  • Loading branch information
joeltine committed Jun 17, 2016
1 parent d2832c3 commit f4c4f20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions closure/goog/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down

0 comments on commit f4c4f20

Please sign in to comment.