0.0.6 • Published 3 years ago
@mangoweb/shapes-fallback v0.0.6
ShapesFallback
The manGoweb ShapesFallback component.
Installation
npm install @mangoweb/shapes-fallback @mangoweb/scripts-baseThis is a @mangoweb/scripts-base component.
Usage
In your template:
<script>
	window.initComponents = (window.initComponents || []).push({
		name: 'ShapesFallback',
	})
</script>or in your js:
import { applyShapesFallbackIfNeeded } from '@mangoweb/shapes-fallback'
const rawHTML = 'something something <svg…> something'
const output = document.querySelector('#output')
output.innerHTML = rawHTML
applyShapesFallbackIfNeeded(output)