0.3.1 • Published 3 years ago

@ungap/create-content v0.3.1

Weekly downloads
1,459
License
ISC
Repository
github
Last release
3 years ago

createContent

Build Status Coverage Status Greenkeeper badge WebReflection status

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.

Example

// createContent(markup[, type = 'html'[, normalize = false]])
const htmlContent = createContent('<td>any content</td>');
const svgContent = createContent('<rect x=1 y=2 />', 'svg');

Live test