Selection.modify() taking optional strings doesn't make sense to me
まだ誰も着手していません。
評価
調査の方向性
Start with the Selection.modify() definition in the linked Selection API specification and compare the optional-argument behavior described there with the WebKit, Blink, and Gecko behavior noted in the issue. Determine whether the specification should require arguments or clarify the silent-abort behavior; the work is done when the issue's proposed resolution is reflected in the specification.
索引モデルが issue の本文から書いたものです。
説明
https://w3c.github.io/selection-api/#dom-selection-modify says:
undefined modify(optional DOMString alter, optional DOMString direction, optional DOMString granularity);
However it also says:
If alter is not ASCII case-insensitive match with "extend" or "move", abort these steps.
If direction is not ASCII case-insensitive match with "forward", "backward", "left", or "right", abort these steps.
If granularity is not ASCII case-insensitive match with "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", "documentboundary", abort these steps.
So, basically, it early returns without errors if any of the arguments don't match. That doesn't make a lot of sense to me.
That seems to match WebKit and Blink's implementation. Gecko however throws a reasonable error and makes the strings mandatory.
I think the Gecko behavior is preferable, but if we're going with the "silent error" behavior of WebKit / Blink, maybe we should clarify it as a compatibility quirk (since it's really odd).
cc @rniwa @smaug---- @foolip
- 主要言語
- HTML
- スター
- 49
- フォーク
- 30
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
w3c/selection-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
w3c/selection-api#354 ·
-
Agenda+
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
w3c/selection-api#361 · コメント 2 件 ·
-
Remove single range restriction for selection interface apis再び着手できるかも @sambandaru が 139 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
w3c/selection-api#358 · コメント 2 件 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
w3c/selection-api#355 ·
-
the steps of Selection.extend() does not check whether the given offset is valid in the containerオープン
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
w3c/selection-api#353 · コメント 1 件 ·
w3c/selection-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
web-infra-dev/rsbuild#8608 ·
メンテナーはふだん 1 日以内に返信
-
google_chat: format_message leaks GCn placeholders when inline code is inside bold/header/link textオープンcomp/plugins P3 sweeper:risk-message-delivery type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#128985 ·
メンテナーはふだん 1 日以内に返信
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
vector-store
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信