-
Notifications
You must be signed in to change notification settings - Fork 37
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
Allow event bubbling from widgets #39
Comments
Cool! I like the idea. |
I think this would a nice improvement. I definitely think bubbling should be opt-in only and I think having a new Other things to consider:
|
👍 |
I still support this proposal. I'm not sure when I would be able to get to this issue so I have tagged the issue as |
It would be useful if an event emitted from a widget could bubble up the DOM and be caught by a non-immediate parent. One example of where this would be useful is in a single page app architecture, where a parent widget may want to control navigation between children based on navigation events. In this case there could be many child widgets which emit nav events, and they may not be direct children.
After discussing with Patrick, it seems like a simple implementation could look like this:
This would make the bubbling optional, and allow the listener to call stop propagation on the event object.
The text was updated successfully, but these errors were encountered: