ResizeObserver not present on the Window interface

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

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
tooling

調査の方向性

まず、ResizeObserver と Window のジェネレーター入力および生成された DOM 宣言をたどります。Window インターフェースがどのように表現されているかを確認し、その後、リポジトリに関連する生成または型チェックのチェックを実行します。popup.ResizeObserver が型チェックを通過し、グローバル宣言が引き続き利用可能であれば完了です。

索引モデルが issue の本文から書いたものです。

説明

The ResizeObserver class is only available as a global declaration and not on the Window interface. I think it should also be available on the Window interface for at least two reasons:

  • The specification (https://drafts.csswg.org/resize-observer/#idl-index) says [Exposed=(Window)], which I’m guessing means that it is supposed to be on the Window interface (I’m actually surprised, isn’t the specification supposed to be automatically translated to Typescript declarations?)
  • For applications with several windows, it behaves differently depending on the window from which it is taken (see https://codepen.io/Latcarf/pen/RwdyLXr?editors=0010). So it would make a lot of sense to be able to do the following, which currently doesn’t typecheck as popup is of type Window.
const popup = window.open(...)!;
new popup.ResizeObserver(...);
主要言語
TypeScript
スター
740
フォーク
474
平均マージ
2日 8時間
マージ済み PR(30日)
15

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

microsoft/TypeScript-DOM-lib-generator のほかの issue

microsoft/TypeScript-DOM-lib-generator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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