{"ScriptPreparationCode":null,"TestCases":[{"Name":"new","Code":"const matchMedia1 = window.matchMedia(\u0022(min-width: 400px)\u0022);\r\nconst matchMedia2 = window.matchMedia(\u0022(min-width: 700px)\u0022);\r\nconst matchMedia3 = window.matchMedia(\u0022(min-width: 1000px)\u0022);\r\nconst matchMedia4 = window.matchMedia(\u0022(min-width: 1200px)\u0022);\r\n\r\nmatchMedia1.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(true); \r\n }\r\n})\r\nmatchMedia2.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(true); \r\n }\r\n})\r\nmatchMedia3.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(true); \r\n }\r\n})\r\nmatchMedia4.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(true); \r\n }\r\n})\r\n","IsDeferred":false},{"Name":"normal","Code":"let conf = {\r\n breakpoints: {\r\n mobile: {\r\n max: 768,\r\n min: 0\r\n },\r\n tablet: {\r\n min: 768\r\n },\r\n desktop: {\r\n min: 1024,\r\n },\r\n tabletOnly: {\r\n min: 768,\r\n max: 1024\r\n },\r\n },\r\n isMobile: false,\r\n isTablet: false,\r\n isDesktop: false,\r\n isTabletOnly: false\r\n}\r\n\r\nwindow.addEventListener(\u0027resize\u0027, () =\u003E {\r\n const width = document.documentElement.clientWidth;\r\n \r\n conf.isMobile = width \u003C conf.breakpoints.mobile.max\r\n conf.isTablet = width \u003E= conf.breakpoints.tablet.min\r\n conf.isDesktop = width \u003E= conf.breakpoints.desktop.min\r\n conf.isTabletOnly = width \u003E= conf.breakpoints.tabletOnly.min \u0026\u0026 width \u003C conf.breakpoints.tabletOnly.max\r\n});","IsDeferred":false}]}