package
A cross browser utility to create HTML or SVG runtime content
npm install @ungap/create-contentGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
8.6 kB
Includes dependencies.
A cross browser utility to create HTML or SVG runtime content, as lightweight alternative to what a HTMLTemplateElement polyfill could do through its content accessor.
import createContent from '@ungap/create-content'const createContent = require('@ungap/create-content')// createContent(markup[, type = 'html'[, normalize = false]])
const htmlContent = createContent('<td>any content</td>');
const svgContent = createContent('<rect x=1 y=2 />', 'svg');