@mangoweb/shapes-fallback
v0.0.6
Published
Injects svg with symbols if needed.
Downloads
4
Keywords
Readme
ShapesFallback
The manGoweb ShapesFallback component.
Installation
npm install @mangoweb/shapes-fallback @mangoweb/scripts-base
This 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)