(mediaQueryString: string)
| 51 | } |
| 52 | |
| 53 | function matchMedia(mediaQueryString: string): MediaQueryListImpl { |
| 54 | isMediaInitializationEnabled = true; |
| 55 | const mediaQueryList = new MediaQueryListImpl(); |
| 56 | isMediaInitializationEnabled = false; |
| 57 | |
| 58 | mediaQueryList._media = mediaQueryString; |
| 59 | mediaQueryList._matches = checkIfMediaQueryMatches(mediaQueryString); |
| 60 | return mediaQueryList; |
| 61 | } |
| 62 | |
| 63 | class MediaQueryListImpl extends Observable implements MediaQueryList { |
| 64 | public static readonly changeEvent = 'change'; |