(win: any = window)
| 23 | }; |
| 24 | |
| 25 | export const setupPlatforms = (win: any = window) => { |
| 26 | if (typeof win === 'undefined') { |
| 27 | return []; |
| 28 | } |
| 29 | |
| 30 | win.Ionic = win.Ionic || {}; |
| 31 | |
| 32 | let platforms: Platforms[] | undefined | null = win.Ionic.platforms; |
| 33 | if (platforms == null) { |
| 34 | platforms = win.Ionic.platforms = detectPlatforms(win); |
| 35 | platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`)); |
| 36 | } |
| 37 | return platforms; |
| 38 | }; |
| 39 | |
| 40 | const detectPlatforms = (win: Window) => { |
| 41 | const customPlatformMethods = config.get('platform'); |
no test coverage detected