JavaScript DOM Element Abstraction
import {$, $all, tempElement, Element} from '@electrikmilk/element';
const body = $('body');
body.style.backgroundColor = 'black';
body.style.color = 'white';
tempElement('div', {
class: 'temp',
text: 'test',
}, async (element) => {
console.log(element.innerText);
});
const myDiv = new Element('div', {
class: 'message',
text: '> Hello, Element!'
});
myDiv.style('backgroundColor','red');
const divs = $all('div');
divs.forEach((e) => {
e.style.color = 'lightgreen';
});