A recently imported WPT test has a subtest that effectively does the following: const mql = window.matchMedia(""); mql.removeListener(null);