Remove single range restriction for selection interface apis
@sambandaru ya está trabajando en esto.
Desde el 14/5/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Proposal
Remove the single-range restriction from the Selection API. Allow addRange() to accumulate disjoint ranges, rangeCount to return values > 1, and getRangeAt(index) to accept index > 0. The API was designed for multiple ranges; this reverses the 2011 restriction. Chromium is pursuing implementation.
Explainer: MicrosoftEdge/MSEdgeExplainers — Multi-Range Selection (PR)
Canonical issue: #41 (open since Jan 2015)
Chromium feature request: issues.chromium.org/504686717
Webkit open bug: webkit.org/b/186465
Spec changes required
- Section 2 — Allow a collection of ranges instead of "a single range"
- Section 3,
addRange()Step 2 — Remove the abort; define accumulation/merge semantics - Section 3,
rangeCount— Allow values > 1 - Section 3,
getRangeAt()— Allow index > 0
Prior vendor interest
- Google/Blink (TPAC 2017): @yoichio — "As Google Chrome, we are interested in supporting multiple range" (minutes)
- Microsoft (2015): Ben Peters — "Layout order is not possible without multi-selection" (public-webapps)
- Mozilla/Gecko: Ships multi-range for 20+ years. Stable, no web-compat issues.
- #336 — Shadow DOM flat tree (TPAC 2024) acknowledges multi-range as a solution path
- #115 — Developer request for table column selection, closed as dup of #41
Request
Requesting discussion in the Web Editing WG to build consensus on removing this restriction.
- Lenguaje dominante
- HTML
- Estrellas
- 49
- Forks
- 30
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de w3c/selection-api
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
w3c/selection-api#354 ·
-
Agenda+
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
w3c/selection-api#361 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
w3c/selection-api#355 ·
-
the steps of Selection.extend() does not check whether the given offset is valid in the containerAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 55/100
w3c/selection-api#353 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
w3c/selection-api#352 ·