Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`anchorNode` & `focusNode` can never be in shadow tree?

Abierto
#361 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
html

Línea de trabajo

Compare the Selection API definitions for anchor/focus and the anchorNode attribute, then inspect tests/wpt/tests/selection/shadow-dom/tentative/Selection-isCollapsed.html around line 48. Determine whether the specification text or the test is inconsistent, and document a resolved, internally consistent behavior.

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

Descripción

Agenda+

anchor and focus of selection need not to be in the document tree. It could be in a shadow tree of the same document.

However, it also says:
anchorNode
The attribute must return the anchor node of this, or null if the anchor is null or anchor is not in the document tree.

So anchorNode can never be in shadow tree. This is also contradictory to tests:
https://github.com/servo/servo/blob/e83f3117045171e59f230c3b36ebd721826d3754/tests/wpt/tests/selection/shadow-dom/tentative/Selection-isCollapsed.html#L48

Lenguaje dominante
HTML
Estrellas
49
Forks
30
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

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.

Más de w3c/selection-api

Todos los issues de w3c/selection-api

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.