* 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
()
| 286 | * This will determine if style registration should be done via cssText (<= IE9) or not |
| 287 | */ |
| 288 | function 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 | } |