nodejs / nodejs/node

Support for WICG Observable

Abierto
#51,828 2 comentarios 9 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #53399 de @jasnell — cerrado sin fusionar
feature request never-stale web-standards
Lenguaje dominante
JavaScript
Estrellas
122k
Forks
37.3k
Merge medio
4 d 2 h
PR fusionados (30 d)
283

Descripción

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:

https://github.com/nodejs/node/blob/a0ac8bd4d85e5614f43e4fed3e0c73641cd45fa8/lib/internal/event_target.js#L551

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
backend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.