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 * 🔤 * 🔤 * 🔤 * 🔤 * 📺
14 lines
299 B
JavaScript
14 lines
299 B
JavaScript
// pseudocode
|
|
// Mixed concerns make code hard to maintain
|
|
const button = document.querySelector('button');
|
|
let count = 0;
|
|
|
|
button.addEventListener('click', () => {
|
|
count++;
|
|
document.querySelector('p').textContent =
|
|
'Clicked ' + count + ' times';
|
|
|
|
if (count > 10)
|
|
button.disabled = true;
|
|
});
|