API メソッドサブページのテンプレート

This translation is incomplete. この記事の翻訳にご協力ください

公開前に削除してください

タイトルとスラッグ

API メソッドサブページのタイトルは、インターフェイス名 + "." + メソッド名 + "()" としてください。例えば、 IDBIndex インターフェイスの count() メソッドのタイトル は "IDBIndex.count()" です。

スラッグ (URL の最後の部分) は、メソッド名を括弧なして記述してください。ですから count() のスラッグは "count" です。

先頭で使用するマクロ

既定では、テンプレートの先頭に5つのマクロ呼び出しがあります。以下のアドバイスに従って、更新や削除をしてください。

  • {{APIRef("GroupDataName")}} — this generates the left hand reference sidebar showing quick reference links related to the current page. For example, every page in the WebVR API has the same sidebar, which points to the other pages in the API. To generate the correct sidebar for your API, you need to add a GroupData entry to our KumaScript GitHub repo, and include the entry's name inside the macro call in place of GroupDataName. See our API reference sidebars guide for information on how to do this.
  • {{Draft}} — this generates a Draft banner that indicates that the page is not yet complete, and should only be removed when the first draft of the page is completely finished. After it is ready to be published, you can remove this.
  • {{SeeCompatTable}} — this generates a This is an experimental technology banner that indicates the technology is experimental). If the technology you are documenting is not experimental, you can remove this. If it is experimental, and the technology is hidden behind a pref in Firefox, you should also fill in an entry for it in the Experimental features in Firefox page.
  • {{SecureContext_Header}} — this generates a Secure context banner that indicates the technology is only available in a secure context. If it isn't, then you can remove the macro call. If it is, then you should also fill in an entry for it in the Features restricted to secure contexts page.
  • {{Deprecated_Header}} — this generates a Deprecated banner that indicates the technology is deprecated. If it isn't, then you can remove the macro call.

タグ

In an API method subpage, you need to include the following tags (see the Tags section at the bottom of the editor UI): API, Reference, Method, the name of the API (e.g. WebVR), the name of the parent interface (e.g. IDBIndex), the name of the method (e.g. count()), Experimental (if the technology is experimental), Secure context (if it is available in a secure context only), and Deprecated (if it is deprecated).

Optionally, you can elect to include some other tags that effective represent terms people might search for when looking for information on that technology. For example on WebVR interface pages we include VR and Virtual reality.

ブラウザーの互換性

To fill in the browser compat data, you first need to fill in an entry for the API into our Browser compat data repo — see our guide on how to do this.

Once that is done, you can show the compat data for the method with a {{Compat()}} macro call.

草案
このページは完成していません。

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

安全なコンテキスト用
この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

非推奨
この機能はウェブ標準から削除されました。まだ対応しているプラウザーがあるかもしれませんが、ゆくゆくはなくなるものです。使用を避け、できれば既存のコードを更新してください。このページの下部にあるブラウザーの対応を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。

The summary paragraph — start by naming the method, saying what interface it is part of, and saying what it does. This should ideally be 1 or 2 short sentences. You could copy most of this from the method's summary on the corresponding API reference page.

構文

Fill in a syntax box, according to the guidance in our syntax sections article.

引数

parameter1Optional
Include a brief description of the parameter and what it does here. Include one term and definition for each parameter. If the parameter is not optional, remove the {{optional_inline}} macro call.
parameter2
etc.

返値

Include a description of the method's return value, including data type and what it represents. If the method doesn't return anything, just put "Void".

例外

Exception1
Include a list of all the exceptions that the method can raise, along with descriptions of how that exception is raised. Include one term and definition for each exception.
Exception2
etc.

Fill in a simple example that nicely shows a typical usage of the method, then perhaps some more complex examples (see our guide on how to add code examples for more information).

my code block

And/or include a list of links to useful code samples that live elsewhere:

  • x
  • y
  • z

仕様書

仕様書 状態 備考
Unknown
NameOfTheMethod の定義
不明 初回定義

ブラウザーの互換性

No compatibility data found. Please contribute data for "path.to.feature.NameOfTheMethod" (depth: 1) to the MDN compatibility data repository.

関連情報

  • Include list of
  • other links related to
  • this API that might
  • be useful