廃止報告

ドラフトコミュニティグループレポート,

このバージョン:
https://wicg.github.io/deprecation-reporting/
バージョン履歴:
https://github.com/WICG/deprecation-reporting/commits/gh-pages
編集者:
(Google Inc.)
参加方法:
課題を提出 (オープン課題)

概要

この文書は、廃止された機能の利用をサイト所有者に報告する仕組みを Reporting APIを用いて定義します。

この文書のステータス

この仕様は Web Platform Incubator Community Group によって公開されました。 W3C標準ではなく、W3Cの標準化トラックにも載っていません。 W3C Community Contributor License Agreement (CLA) のもと、限定的なオプトアウトやその他の条件が適用されますのでご注意ください。 W3Cコミュニティおよびビジネスグループについて詳しくは、こちらをご覧ください。

1. はじめに

[INTRODUCTION GOES HERE]

1.1.

Example, Inc.は、自社サイト上でユーザーが将来のブラウザバージョンで削除予定のWeb APIを使用したタイミングを記録したいと考えています。これを実現するため、以下のヘッダーを配信してデフォルトの報告エンドポイントを定義できます。これにより廃止報告がそのエンドポイントに送られます:
Reporting-Endpoints: default="https://example.com/reports"

2. 廃止報告

廃止報告は、将来のブラウザのアップデートで動作しなくなる見込みのブラウザAPIや機能が使用されたことを示します。

廃止報告report の一種です。

廃止報告report type "deprecation" を持ちます。

廃止報告ReportingObserver から確認できます。

[Exposed=(Window,Worker)]
interface DeprecationReportBody : ReportBody {
  [Default] object toJSON();
  readonly attribute DOMString id;
  readonly attribute object? anticipatedRemoval;
  readonly attribute DOMString message;
  readonly attribute DOMString? sourceFile;
  readonly attribute unsigned long? lineNumber;
  readonly attribute unsigned long? columnNumber;
};

廃止報告body(JavaScript上では DeprecationReportBody)には、以下のフィールドが含まれます:

注: 廃止報告は必ず default という名前のエンドポイントに配信されます。現時点ではこれを上書きする方法はありません。他種の報告のみを受け取って廃止報告を受け取りたくない場合は、他報告用エンドポイント名を別途設定してください。

3. 報告例

    POST /reports HTTP/1.1
    Host: example.com
    ...
    Content-Type: application/reports+json

    [{
      "type": "deprecation",
      "age": 32,
      "url": "https://example.com/",
      "user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0",
      "body": {
        "id": "websql",
        "anticipatedRemoval": "2020-01-01",
        "message": "WebSQL は廃止され、Chrome 97(2020年1月頃)で削除されます",
        "sourceFile": "https://example.com/index.js",
        "lineNumber": 1234,
        "columnNumber": 42
      }
    }]
}

4. セキュリティの考慮事項

帯域外報告全般のセキュリティ考慮事項については Reporting API §8 セキュリティの考慮事項 を参照してください。

このセクションの残りでは、廃止報告固有のセキュリティの考慮事項について述べます。

5. プライバシーの考慮事項

帯域外報告全般のプライバシー考慮事項については Reporting API §9 プライバシーの考慮事項 を参照してください。

このセクションの残りでは、廃止報告固有のプライバシーの考慮事項について述べます。

索引

本仕様で定義された用語

参照によって定義された用語

参考文献

規範的参考文献

[ECMASCRIPT]
ECMAScript 言語仕様. URL: https://tc39.es/ecma262/
[REPORTING-1]
Douglas Creager 他. Reporting API. 2018年9月25日. WD. URL: https://www.w3.org/TR/reporting-1/
[WebIDL]
Boris Zbarsky. Web IDL. 2016年12月15日. ED. URL: https://heycam.github.io/webidl/

IDL索引

[Exposed=(Window,Worker)]
interface DeprecationReportBody : ReportBody {
  [Default] object toJSON();
  readonly attribute DOMString id;
  readonly attribute object? anticipatedRemoval;
  readonly attribute DOMString message;
  readonly attribute DOMString? sourceFile;
  readonly attribute unsigned long? lineNumber;
  readonly attribute unsigned long? columnNumber;
};