Skip to content

A cross browser utility to create HTML or SVG runtime content

Notifications You must be signed in to change notification settings

ungap/create-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A cross browser utility to create HTML or SVG runtime content

Resources

Stars

Watchers

Forks

Packages

No packages published