MCPcopy Index your code
hub / github.com/microsoft/rushstack / shouldUseCssText

Function shouldUseCssText

src/index.ts:288–299  ·  view source on GitHub ↗

* Checks to see if styleSheet exists as a property off of a style element. * This will determine if style registration should be done via cssText (<= IE9) or not

()

Source from the content-addressed store, hash-verified

286 * This will determine if style registration should be done via cssText (<= IE9) or not
287 */
288function shouldUseCssText(): boolean {
289 let useCSSText: boolean = false;
290
291 if (typeof document !== 'undefined') {
292 const emptyStyle: IExtendedHtmlStyleElement = document.createElement('style') as IExtendedHtmlStyleElement;
293
294 emptyStyle.type = 'text/css';
295 useCSSText = !!emptyStyle.styleSheet;
296 }
297
298 return useCSSText;
299}

Callers 1

loadStylesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected