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

Anne Feedback #4

Open
8 tasks
pemrouz opened this issue May 23, 2019 · 0 comments
Open
8 tasks

Anne Feedback #4

pemrouz opened this issue May 23, 2019 · 0 comments

Comments

@pemrouz
Copy link
Contributor

pemrouz commented May 23, 2019

Very productive meeting with @annevk and lots of great feedback.

  • Differences with Observables and better model for events
  • Events are not just values, they're objects you can interact with. We've tested in some applications, but need to double check all edge cases i.e. stopPropagation, preventDefault, etc. emitter.on('click') currently vends a new Emitter so much less of an issue.
  • on recognises like "EventTarget-like" objects. This should probably be changed to use a Symbol instead that both browsers and node can implement and language doesn't need to know about it.
  • Keeping on/once/emit on prototype would probably actually be more convenient for web devs.
  • Would be great to have this shared based class and operators in the runtime which platform can leverage
  • Discussed some weakref-y semantics on unsubscription, seems better to keep as-is for now (explicitly removes listener when Emitter resolves or rejects).
  • Observers! There's a few new platform API which didn't use EventTarget and use this new pattern. Consumers would appreciate being able to use the same utility methods to operate on values. There's no shared base class we can define a relation with, but we can investigate ways of making it easy to upgrade from some observer to an Emitter.
  • Moving forward: keep a single repo in TC39 for issues rather than fork in WICG, file any issues against relevant spec, e.g. DOM
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

1 participant