3 ms·
I agree with everything but inline javascript <button onclick="this.classList.add('bg-green')"> Click Me </button> This is going to be problematic when it c
by meatjuice 3y ago
I agree with everything but inline javascript
<button onclick="this.classList.add('bg-green')">
Click Me
</button>
This is going to be problematic when it comes to debugging. I still think scripts should be in a file and loaded in the header.
- quickthrower2 3y agoIt is going to be problematic when it comes to refactoring. "Can you make the button's parent container green" request comes in. Now you are hunting through CSS selector going up and down the tree. "Can you put the button that goes green into this page". Now bam! The CSS selector you used breaks as there is another element to confuse the query.