extensions/markdown-language-features/preview-src/settings.ts/getData
export function getData<T = {}>(key: string): T {
	const element = document.getElementById('vscode-markdown-preview-data');
	if (element) {
		const data = element.getAttribute(key);
		if (data) {
			return JSON.parse(data);
		}
	}

	throw new Error(`Could not load data for ${key}`);
}