1.0.7 • Published 6 years ago

el-tool v1.0.7

Weekly downloads
24
License
-
Repository
-
Last release
6 years ago

EL-tool

El-tool is a tersifier for creating DOM nodes and adding event listeners. It is not a library, it just shortens some rather verbose native code.

QRE (quick reference example)

The following are the same:

Vanilla.js (730 char)

El.ts (331 char)

Benefits

  • Currently the fastest possible way to render an interactive DOM (see benchmarks section below)
  • Nested syntax reflects DOM nesting
  • < 250 lines of code (with comments, unminified)
  • Significantly reduces redundancy in code
  • Super easy DOM node reference catching (no queries)

Helper Functions

byId(id) : tersifies as document.getElementById(id)

classSplice(element: HTMLElement, removeClasses: string | string[], addClasses: string | string[]) : tersifies element.classList.add() and element.classList.remove()

removeChildren(parent: HTMLElement) : removes all children

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago