MCPcopy
hub / github.com/microsoft/SandDance / clearStyles

Function clearStyles

docs/app/js/sanddance-app.js:27137–27147  ·  view source on GitHub ↗
(option)

Source from the content-addressed store, hash-verified

27135 reloadStyles();
27136}
27137function clearStyles(option) {
27138 if (option === void 0) option = 3 /* all */ ;
27139 if (option === 3 /* all */ || option === 2 /* onlyNonThemable */ ) {
27140 clearStylesInternal(_themeState.registeredStyles);
27141 _themeState.registeredStyles = [];
27142 }
27143 if (option === 3 /* all */ || option === 1 /* onlyThemable */ ) {
27144 clearStylesInternal(_themeState.registeredThemableStyles);
27145 _themeState.registeredThemableStyles = [];
27146 }
27147}
27148function clearStylesInternal(records) {
27149 records.forEach(function(styleRecord) {
27150 var styleElement = styleRecord && styleRecord.styleElement;

Callers 1

reloadStylesFunction · 0.85

Calls 1

clearStylesInternalFunction · 0.85

Tested by

no test coverage detected