element-helper-lite
v0.2.2
Published
Light wait create elements
Downloads
2
Readme
element-helper-lite
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);