How to use the mwp-app-render/lib/util/browserPolyfill.getPolyfill function in mwp-app-render

To help you get started, we’ve selected a few mwp-app-render examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meetup / meetup-web-platform / packages / mwp-app-render / src / components / Dom.jsx View on Github external
const {
		appMarkup = '',
		appContext,
		head,
		initialState = {},
		scripts,
		cssLinks,
	} = props;

	const localeCode = initialState.config.requestLanguage;
	const htmlLang = localeCode.split('-')[0];

	/**
	 * Add polyfill.io script if needed
	 */
	const polyfill = getPolyfill(appContext.userAgent, localeCode);
	const js = polyfill ? [polyfill, ...scripts] : [...scripts];

	/**
	 * `initialState` has untrusted user-generated content that needs to be
	 * written into the DOM inside a 

mwp-app-render

MWP application rendering tools

MIT
Latest version published 1 year ago

Package Health Score

48 / 100
Full package analysis

Similar packages