{"ScriptPreparationCode":null,"TestCases":[{"Name":"matchMedia \u002B addListener","Code":"const matchMedia = window.matchMedia(\u0022(min-width: 400px)\u0022);\r\n\r\nmatchMedia.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(true); \r\n }\r\n})\r\n","IsDeferred":false},{"Name":"resize \u002B innerWidth","Code":"let currentWidth = window.innerWidth;\r\n\r\nconst debounce = (func, delay) =\u003E {\r\n let timeoutId;\r\n\r\n return function (...args) {\r\n clearTimeout(timeoutId);\r\n timeoutId = setTimeout(() =\u003E {\r\n func(...args);\r\n }, delay);\r\n };\r\n};\r\n\r\nwindow.addEventListener(\u0027resize\u0027, debounce(() =\u003E {\r\n currentWidth = window.innerWidth;\r\n}, 100));\r\n\r\nif (currentWidth \u003E 400) {\r\n console.log(true); \r\n}","IsDeferred":false}]}