webtides / element-js

Simple and lightweight base classes for web components with a beautiful API
MIT License
28 stars 3 forks source link

Feature/optional attributes #120

Closed quarkus closed 3 months ago

quarkus commented 3 months ago

I think it makes sense to have a way to make spread remove attributes.

i went with === null as this is a convention we use in other places.

also created an optionalAttribute directive to toggle a single attribute based on a condition