JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9392
  • Score
    100M100P100Q133221F
  • License ISC

A cross browser utility to create HTML or SVG runtime content

Package Exports

  • @ungap/create-content

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ungap/create-content) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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'])
const htmlContent = createContent('<td>any content</td>');
const svgContent = createContent('<rect x=1 y=2 />', 'svg');

Live test