古い互換性一覧表

この記事は翻訳作業中です。

この記事は MDN に互換性データを追加する古い方法を説明しています。新しい互換性データを MDN に追加しようとしている場合は、新しい方法を使用してください。 — 互換性一覧表を参照してください。

互換性一覧表のテンプレート

あなたの記事に下記のコンテンツ全てをコピーペーストしてください (まずコピーの前にエディターに切り替えます)、最初に {{CompatibilityTable}} テンプレートを使って下記の表の両方を含めます。最初の表はブラウザーのデスクトップ版の互換性情報を入れて、2つ目の表にはモバイル版の互換性情報を入れます。これで必須の <div> ブロックを含めた、全てのコンテンツを入手できます。

ブラウザーの対応

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>機能</th>
   <th>Chrome</th>
   <th>Edge</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>基本対応</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>機能</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Edge</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>iOS WebKit<br />
    <sup><sub>(Safari/Chrome/Firefox/etc)</sub></sup></th>
  </tr>
  <tr>
   <td>基本対応</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

一覧表の使用

それぞれのブラウザー用の適切な情報で表を埋めてください。各セルは一般的に、サポートが追加・削除された (またはプレフィックスが削除された) ただ一つのバージョン番号を含んでいるべきで、"[number]" フォーム内のオプションのフォームや、表の下の番号に相応した註記が入ることもあります。必要な場合や適切な場合は、 気軽に 適切な追加ドキュメントへリンクした註記を入れてください、そして必ず配布されたテンプレートを使って、バージョン情報のルックアンドフィールが整合しているようにします。

大事なことは {{CompatibilityTable}} テンプレートを使って、そして2つの <div> ブロックを保ち、1つは "compat-desktop" IDがあってもう1つは "compat-mobile"IDがあるようにし、それぞれが上記に示したフォーマットの適切な表を含んでいる事です。表は正しいスタイルを達成するために "compat-table" クラスを使うべきです。

互換性一覧表で使われるテンプレート

In order to help standardize appearance, and let us more easily change the look and feel of the tables over time, we have a number of templates you should use in the table cells:

Template:CompatNo
Use {{CompatNo}} to indicate that the browser does not support the feature at all or only supports it when toggling a preference.
Template:CompatUnknown
Use {{CompatUnknown}} to indicate that the browser's support for the feature is not known. Hopefully someone who does know will come along and fill this in for you later!
Template:CompatVersionUnknown
Use {{CompatVersionUnknown}} to indicate that the browser has support for the feature but the earliest version of support is not known. Hopefully someone who does know will come along and fill this in for you later!
Template:CompatGeckoDesktop
Use {{CompatGeckoDesktop(geckoversion)}} to indicate compatibility was introduced in the specified Gecko version on desktop Firefox; we have this special template for Gecko so we can let the template map Gecko versions to Firefox releases, given that they don't always correlate in obvious ways (and the relationship can change over time during development).
Template:CompatGeckoMobile
Use {{CompatGeckoMobile(geckoversion)}} to indicate compatibility was introduced in the specified Gecko version on mobile Firefox; we have this special template for Gecko so we can let the template map Gecko versions to Firefox releases, given that they don't always correlate in obvious ways (and the relationship can change over time during development).
Template:CompatChrome
Use {{CompatChrome(chromeversion)}} to indicate compatibility was introduced in the specified Chrome version.
For experimental features

Some features are prefixed with a vendor-specific name (such as -moz- or -webkit-) or are disabled by default when implemented before the specification is finalized. In order to call attention to the compatibility table in these cases, you should use {{SeeCompatTable}} at the top of the page. This generates a box explaining this situation, with a link to the compatibility table. The output looks like this:

これは実験的な機能です。本番で使用する前にブラウザー実装状況をチェックしてください。

Add the version info and append the {{property_prefix(prefix)}} macro for prefixed features. For experimental features, which are disabled by default and can be enabled via a preference, add the {{CompatNo}} macro and a footnote below the table explaining how to enable the feature and mentioning the version that introduced the feature.

All templates are tagged with CompatTemplate.

Webkit 固有のタグ

WebKitBug inserts a link to a bug in the WebKit bug database. This makes it easy for writers to add annotations to documentation to guide developers to information about things that are works in progress in WebKit. You use it like this: {{webkitbug(42)}}, and the result is “WebKit bug 42″, linked to the corresponding bug in the bug database.

See MDN for WebKit Writers for more details.

互換性一覧表のエチケット

In a perfect world, any time someone updates a compatibility table, they'd research every browser and update new tables or rows in tables with the correct and latest information about every browser in the table. In reality, that's a lot to ask of many volunteer contributors and MDN contributors from other browser organizations (hi there and welcome, by the way!). If you're not able to add correct details for every browser, that's okay—but we do ask that you follow a couple of guidelines that will help make sure that information is added by later contributors.

  • When you need to list multiple versions of a browser in a cell (for instance, the version in which something landed behind a preference, then the version in which it was enabled by default, please put them in oldest-version-first order, for consistency.
  • Please don't simply paste {{CompatNo}} or {{CompatVersionUnknown}} for any browser for which you can't provide correct information. If you don't know the answer, please just put {{CompatUnknown}}. This puts a clear indicator into that browser's column that says that someone should find out the answer and add it. If you put any other value, it could get overlooked, resulting in developers being misinformed.
  • Please don't just leave cells empty. This, too, is confusing, as it can look like you may be in the middle of updating the page. It leaves the table in an ambiguous state in which the entire table may be considered unreliable.

ブラウザーを表に追加

Unless you have information to share that's really important (such as to cover a major new browser), you should probably not bother to change existing compatibility tables. Note also that at present, if you want to add a column to the tables as displayed, you have to manually update each affected page's compatibility tables  (this will change with the new system, see the below section).

Note: Please discuss your proposal to add a browser to the compatibility tables on the MDN discussion forum before making the change. This is a major undertaking that needs to be planned properly.

If you do decide to add the column, please insert it in alphabetical order.

ドキュメントのタグと貢献者

このページの貢献者: mfuji09
最終更新者: mfuji09,