Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Remove single range restriction for selection interface apis

オープン
#358 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@sambandaru がすでに取り組んでいます。

2026年5月14日 から。

評価

この issue はまだ評価されていません。

説明

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

  1. Section 2 — Allow a collection of ranges instead of "a single range"
  2. Section 3, addRange() Step 2 — Remove the abort; define accumulation/merge semantics
  3. Section 3, rangeCount — Allow values > 1
  4. 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.

主要言語
HTML
スター
49
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

w3c/selection-api のほかの issue

w3c/selection-api の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。