2.0.0 • Published 4 years ago
@codebundlesbyvik/element-operations v2.0.0
element-operations
JavaScript helper functions for working with element objects.
Installation
// Install package from npm
npm install @codebundlesbyvik/element-operationsimport createEl from "@codebundlesbyvik/css-operations";Functions
createEl(tagName, attrs)
Create an Element and return it.
Parameters
* indicates required
- *
tagName(String):Element's tag name. attrs(Object): Object containing theElement's individual property - value pairs.
Usage
createEl("div", {
class: "example-div",
id: "example-div-1",
ariaHidden: "true"
})
// > <div class="example-div" id="example-div-1" aria-hidden="true"></div>License
MIT © Viktor Chin-Kon-Sung