@ungap/create-content
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/ungap__create-content package

0.3.1 • Public • Published

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

Package Sidebar

Install

npm i @ungap/create-content

Weekly Downloads

2,672

Version

0.3.1

License

ISC

Unpacked Size

8.8 kB

Total Files

7

Last publish

Collaborators

  • webreflection