element-helper-lite
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

element-helper-lite

GitHub package.json version GitHub

Installation

$ npm i -D element-helper-lite

Methods

const elementsCreate: (eArgs: IElementCreate) => HTMLElement
const elementAddToDoc: (el: HTMLElement, location: ElLocation) => void
const elementAddNewToDoc: (eArgs: IElementCreate, location: ElLocation) => HTMLElement

Enums

enum ElLocation

Interfaces

interface IElementCreate

Example

const args: IElementCreate = {
  tag: 'div',
  attribs: {
    id: 'tinybox',
    class: 'gmbox gmbox-window'
  },
  children: [{
    tag: 'div',
    attribs: {
      class: 'gmclose'
    }
  },
  {
    tag: 'div',
    attribs: {
      id: appSettings.fullScreenRealId,
    },
    children: [{
        tag: 'textarea',
        attribs: {
          id: appSettings.tinyId,
          rows: '18',
          cols: '66'
        }
      }]
  },
  {
    tag: 'div',
    attribs: { id: 'za_one', class: 'za' }
  }]
}
elementAddNewToDoc(args, ElLocation.head);

Readme

Keywords

Package Sidebar

Install

npm i element-helper-lite

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

15.9 kB

Total Files

6

Last publish

Collaborators

  • amourspirit