src/vs/base/browser/dom.ts/addMatchMediaChangeListener
export function addMatchMediaChangeListener(query: string, callback: () => void): void {
	const mediaQueryList = window.matchMedia(query);
	if (typeof mediaQueryList.addEventListener === 'function') {
		mediaQueryList.addEventListener('change', callback);
	} else {
		// Safari 13.x
		mediaQueryList.addListener(callback);
	}
}