Variable eConst

e: any = ...

A simple proxy object for creating and 'setting up' a new element in one go. Can be nested to create and setup entire DOM trees. This is much more powerful than the simple elements function which simply creates and returns 1 or more elements.

Example

import { e } from 'deleight/apriori';
const tree = e.main(e.h1('Title', // stringd are appended
h1 => console.log(h1, ' created')), // functions are called with the new element
e.section(e.h2('Section 1'),
e.p('This is the first section',
{ className: 'text-centre' } // objects are used to assign properties.
)
) // nodes are appended
);
document.appendChild(tree);