Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML support for triggering close signal #26

Open
tbondwilkinson opened this issue Aug 22, 2022 · 2 comments
Open

HTML support for triggering close signal #26

tbondwilkinson opened this issue Aug 22, 2022 · 2 comments

Comments

@tbondwilkinson
Copy link

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.

@domenic
Copy link
Collaborator

domenic commented Aug 22, 2022

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.

@tbondwilkinson
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants