-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MediaQueryList 以下の記事を更新 #6769
MediaQueryList 以下の記事を更新 #6769
Conversation
camiha
commented
Jul 9, 2022
- Markdown へ移行
- 誤字修正
- リンク項目の更新
Preview URLs
FlawsURL:
URL:
URL:
URL:
External URLsURL:
URL: No new external URLs URL: No new external URLs URL: No new external URLs (this comment was updated 2022-07-11 14:00:49.062020) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
指摘した点の修正をお願いします。
特に、最新の英語版の比較して、変化しているところの改訂を併せてお願いします。
--- | ||
{{APIRef("CSSOM")}} | ||
|
||
A **`MediaQueryList`** オブジェクトは文書に適用されている[メディアクエリ](/ja/docs/Web/CSS/Media_Queries)の情報を格納し、文書の状態に対する中間かつイベントドリブンのマッチングに対応します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先頭の A は不要と思われます。
また、長音のない「メディアクエリ」を「メディアクエリー」に修正してください。(この文章の以下も同様です)。
A **`MediaQueryList`** オブジェクトは文書に適用されている[メディアクエリ](/ja/docs/Web/CSS/Media_Queries)の情報を格納し、文書の状態に対する中間かつイベントドリブンのマッチングに対応します。 | |
**`MediaQueryList`** オブジェクトは文書に適用されている[メディアクエリー](/ja/docs/Web/CSS/Media_Queries)の情報を格納し、文書の状態に対する中間かつイベントドリブンのマッチングに対応します。 |
|
||
`MediaQueryList` は {{DOMxRef("Window.matchMedia", "matchMedia()")}} を {{DOMxRef("window")}} オブジェクト上で呼び出すことで作成することができます。結果として得られるオブジェクトは、メディアクエリの状態が変化したとき (つまり、メディアクエリのテストが `true` の評価が開始または停止したとき) に、リスナーへの通知の送信を処理します。 | ||
|
||
これにより、定期的に値をポーリングするのではなく、文書を観察してメディアクエリが変更されたときに検出することが可能になり、メディアクエリの状態に基づいて文書にプログラム的に変更を加えることができるので、アダプティブデザインにとても便利です。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ポーリングを行わないための方策ですので、「観察」よりも「監視」と訳した方が良いと思います。
これにより、定期的に値をポーリングするのではなく、文書を観察してメディアクエリが変更されたときに検出することが可能になり、メディアクエリの状態に基づいて文書にプログラム的に変更を加えることができるので、アダプティブデザインにとても便利です。 | |
これにより、定期的に値をポーリングするのではなく、文書を監視してメディアクエリが変更されたときに検出することが可能になり、メディアクエリの状態に基づいて文書にプログラム的に変更を加えることができるので、アダプティブデザインにとても便利です。 |
_`MediaQueryList` インターフェイスは親インターフェイスである {{DOMxRef("EventTarget")}} からプロパティを継承しています。_ | ||
|
||
- {{DOMxRef("MediaQueryList.matches", "matches")}}{{ReadOnlyInline}} | ||
- : {{jsxref("Boolean")}} で、 `true` であれば {{DOMxRef("document")}} が現在メディアクエリリストに一致しており、 `false` であればそうではありません。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英語版では {{jsxref("Boolean")}} ではなく boolean と書かれています。実際、 {{jsxref("Boolean")}} は誤りですので修正をお願いします。
- {{DOMxRef("MediaQueryList.matches", "matches")}}{{ReadOnlyInline}} | ||
- : {{jsxref("Boolean")}} で、 `true` であれば {{DOMxRef("document")}} が現在メディアクエリリストに一致しており、 `false` であればそうではありません。 | ||
- {{DOMxRef("MediaQueryList.media", "media")}}{{ReadOnlyInline}} | ||
- : {{DOMxRef("DOMString")}} で、シリアライズされたメディアクエリを表します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原文では {{DOMxRef("DOMString")}} ではなく string となっていますので、修正をお願いします。
- : {{DOMxRef("DOMString")}} で、シリアライズされたメディアクエリを表します。 | |
- : 文字列で、シリアライズされたメディアクエリーを表します。 |
|
||
_`MediaQueryList` インターフェイスは親インターフェイスである {{DOMxRef("EventTarget")}} からメソッドを継承しています。_ | ||
|
||
- {{DOMxRef("MediaQueryList.addListener", "addListener()")}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英語版では deprecated のマークがついています。
英語版の最新記事に合わせるようにお願いします。
|
||
`matches` の値が変化した場合は、 `MediaQueryList` で発生する {{domxref("MediaQueryList.change_event", "change")}} イベントを監視することで通知を受けることができます。 | ||
|
||
## 構文 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英語版のプロパティページでは「構文」の節が削除されていますので、削除するようお願いします。
それ以外の部分も、最新の英語版に合わせてください。
レビュー頂きありがとうございます。ご指摘いただいた点を修正いたしました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OKです。