Support for WICG Observable
Personne n'a encore pris cette issue.
- #53399 par @jasnell — fermée sans fusion
- Langage dominant
- JavaScript
- Étoiles
- 122k
- Forks
- 37.3k
- Merge moyen
- 4 j 2 h
- PR mergées (30 j)
- 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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100