Support for WICG Observable
Nobody has claimed this yet.
- #53399 by @jasnell — closed without merging
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
What is the problem this feature will solve?
This new proposal adds .when method to EventTarget, then we can control event handling using Observable API.
Example from the spec:
// Filtering and mapping:
element
.when('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: https://github.com/WICG/observable/issues/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 .when method at:
What alternatives have you considered?
The @benlesh (contributor of the spec) looks like he already tried to implement this new spec at https://github.com/nodejs/node/pull/51065
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/internal/event_target.js at the linked location and read the WICG Observable specification. Review the prior implementation attempt in pull request #51065 and the standard-tracking issue to understand the expected scope. Done means Node supports the proposed EventTarget .when API consistently with the specification and the example behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100