Skip to content

micro-js/create-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-element

Build status Git tag NPM version Code style

Micro utility for creating DOM elements (svg or regular).

Installation

$ npm install @f/create-element

Usage

You can create regular elements (e.g. div, span), and you can create SVG elements (e.g. circle, tspan). The recognized svg elements are listed here.

var createElement = require('@f/create-element')

var div = createElement('div')
var circle = createElement('circle')

API

createElement(tag)

  • tag - The name of the element you want to create

Returns: A DOM node of type tag created in the appropriate namespace.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •