mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-02 20:15:53 +02:00
* :tap: removed on.attributeChanged and static observedAttributes * ⚡ import optimalization * ⚡ scope.signal * 🔤 🐛 * ⚡ 🐛 registerReactivity and types * 🔤 * ⚡ * 🔤 * 🐛 Node in enviroment * ⚡ todos * ⚡ * ⚡ 🔤 * ⚡ lint * ⚡ memo * 🔤 🐛 memo * ⚡ 🔤 todomvc * 🐛 types * 🔤 p08 signal factory * 🔤 ⚡ types * ⚡ 🔤 lint * 🔤 * 🔤 * 🔤 * 🔤 * 📺
16 lines
349 B
JavaScript
16 lines
349 B
JavaScript
// Verbose, needs temp variables
|
|
const div = document.createElement('div');
|
|
const h1 = document.createElement('h1');
|
|
h1.textContent = 'Title';
|
|
div.append(h1);
|
|
|
|
const p = document.createElement('p');
|
|
p.textContent = 'Paragraph';
|
|
div.append(p);
|
|
|
|
// append doesn't return parent
|
|
// so chaining is not possible
|
|
|
|
// Add to DOM
|
|
document.body.append(div);
|