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

Support for WICG Observable #51828

Open
H4ad opened this issue Feb 21, 2024 · 1 comment
Open

Support for WICG Observable #51828

H4ad opened this issue Feb 21, 2024 · 1 comment
Labels
feature request Issues that request new features to be added to Node.js. never-stale Mark issue so that it is never considered stale web-standards Issues and PRs related to Web APIs

Comments

@H4ad
Copy link
Member

H4ad commented Feb 21, 2024

What is the problem this feature will solve?

This new proposal adds .on method to EventTarget, then we can control event handling using Observable API.

Example from the spec:

// Filtering and mapping:
element
	.on('click')
	.filter((e) => e.target.matches('.foo'))
	.map((e) => ({ x: e.clientX, y: e.clientY }))
	.subscribe({ next: handleClickAtPoint });

Spec: https://github.com/WICG/Observable
Standard Tracking: WICG/observable#93

This is something that makes sense to implement on Node?

What is the feature you are proposing to solve the problem?

Basically implements the new .on method at:

class EventTarget {

What alternatives have you considered?

The @benlesh (contributor of the spec) looks like he already tried to implement this new spec at #51065

@H4ad H4ad added the feature request Issues that request new features to be added to Node.js. label Feb 21, 2024
@H4ad H4ad linked a pull request Jun 10, 2024 that will close this issue
3 tasks
Copy link
Contributor

There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-stale Mark issue so that it is never considered stale label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions github-actions bot added the stale label Aug 20, 2024
@H4ad H4ad added never-stale Mark issue so that it is never considered stale and removed stale labels Aug 20, 2024
@RedYetiDev RedYetiDev added the web-standards Issues and PRs related to Web APIs label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. never-stale Mark issue so that it is never considered stale web-standards Issues and PRs related to Web APIs
Projects
Development

Successfully merging a pull request may close this issue.

2 participants