Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

window.navigator.registerContentHandler

概要

Web サイトを特定の MIME タイプ に関連付けます。

註: 関連付けが許可される Web サイトは、その Web サイト自身に限られます。セキュリティ上の理由で、拡張や Web サイトが他のサイトを対象にして関連付けを行うことはできません。

構文

window.navigator.registerContentHandler(mimeType,uri,title);
  • mimeType は、関連付けたい MIME タイプを表す文字列です。
  • uri は、関連づける URI を表す文字列です。
  • title は、ユーザ向けの関連付けの名称を表す文字列です。

navigator.registerContentHandler("application/vnd.mozilla.maybe.feed",
                                 "https://www.example.tld/?foo=%s",
                                 "My Feed Reader");

注記

Firefox 2 では、application/vnd.mozilla.maybe.feedapplication/atom+xmlapplication/rss+xml MIME タイプだけがサポートされます。これらの値は全て、同じ効果を持っています。また、関連付けは、全てのバージョンの Atom と RSS におけるフィードに対して適用されます。

仕様

WHATWG の Web Applications 1.0 working draft で仕様化されています。

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

タグ: 
 このページの貢献者: fscholz, jsx, ethertank, Potappo
 最終更新者: jsx,