npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

@cloudcmd/create-element

1.1.1 • Public • Published

create-element License NPM version Dependency Status Build Status Coverage

Create DOM element.

Install

npm i @cloudcmd/create-element

API

const createElement = require('@cloudcmd/create-element');
 
// create DOM-element with no attributes
const div = createElement('div');
 
// add innerHTML
const el = createElement('div', {
    notAppend: false, // default
    parent: document.body, // default
    uniq: true, // default
    innerHTML: '<span></span>',
    className: 'abc',
});
 
// load css
const el = createElement('link', {
    rel: 'stylesheet',
    href: '/style.css',
    parent: document.head,
});

License

MIT

install

npm i @cloudcmd/create-element

Downloadsweekly downloads

123

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability