Open tbondwilkinson opened 2 years ago
Like #24 and #25, I feel that this kind of ask is against the current vision of CloseWatcher as a low-level primitive that you could use in a variety of ways, depending on your needs.
I think that's a reasonable. My reason for asking is because I think there's real benefit in having HTML shorthands for what would otherwise only be possible in JavaScript. If we have to add any sugar, I think HTML-based sugar is the most desirable.
What if, for example, we had HTML-declarative mechanism for triggering custom events? In a framework, because of component boundaries, sometimes to get behavior you have to add a full JS controller or component to elements to trigger behavior. If you have a declarative method for doing that instead, you could skip attaching JS to that DOM element altogether.
The Popup API comes with new declarative triggering functionality on buttons for hiding and showing popups.
Should we support something similar for a generic connection to the CloseWatcher?
To enable this, you'd just need an id for the CloseWatcher that can be referenced in HTML.