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

Function initializeThemeState

docs/app/js/sanddance-app.js:27067–27089  ·  view source on GitHub ↗

* initialize global state object

()

Source from the content-addressed store, hash-verified

27065/**
27066 * initialize global state object
27067 */ function initializeThemeState() {
27068 var state = _root.__themeState__ || {
27069 theme: undefined,
27070 lastStyleElement: undefined,
27071 registeredStyles: []
27072 };
27073 if (!state.runState) state = __assign(__assign({}, state), {
27074 perf: {
27075 count: 0,
27076 duration: 0
27077 },
27078 runState: {
27079 flushTimer: 0,
27080 mode: 0 /* sync */ ,
27081 buffer: []
27082 }
27083 });
27084 if (!state.registeredThemableStyles) state = __assign(__assign({}, state), {
27085 registeredThemableStyles: []
27086 });
27087 _root.__themeState__ = state;
27088 return state;
27089}
27090function loadStyles(styles, loadAsync) {
27091 if (loadAsync === void 0) loadAsync = false;
27092 measure(function() {

Callers 1

sanddance-app.jsFile · 0.85

Calls 1

__assignFunction · 0.85

Tested by

no test coverage detected