From d43a795d4209d1632dd44e0803c61674149686bb Mon Sep 17 00:00:00 2001 From: MDN Date: Fri, 25 Jun 2021 00:38:26 +0000 Subject: [CRON] sync translated content --- .../navigator/registercontenthandler/index.html | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 files/zh-cn/orphaned/web/api/navigator/registercontenthandler/index.html (limited to 'files/zh-cn/orphaned/web') diff --git a/files/zh-cn/orphaned/web/api/navigator/registercontenthandler/index.html b/files/zh-cn/orphaned/web/api/navigator/registercontenthandler/index.html new file mode 100644 index 0000000000..a266c55bfb --- /dev/null +++ b/files/zh-cn/orphaned/web/api/navigator/registercontenthandler/index.html @@ -0,0 +1,48 @@ +--- +title: Navigator.registerContentHandler() +slug: orphaned/Web/API/Navigator/registerContentHandler +translation_of: Web/API/Navigator/registerContentHandler +original_slug: Web/API/Navigator/registerContentHandler +--- +
{{ ApiRef("HTML DOM") }}
+ +

概述

+ +

Allows web sites to register themselves as possible handlers for content of a particular MIME type.

+ +

{{ Note("Web sites may only register content handlers for themselves. For security reasons, it\'s not possible for an extension or web site to register content handlers targeting other sites.") }}

+ +

语法

+ +
window.navigator.registerContentHandler(mimeType, uri, title);
+
+ + + +

例子

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

备注

+ +

For Firefox 2 and above, only the application/vnd.mozilla.maybe.feed, application/atom+xml, and application/rss+xml MIME types are supported. All values have the same effect, and the registered handler will receive feeds in all Atom and RSS versions  (see {{ Bug("391286") }}).

+ +

规范

+ +

WHATWG's Web Applications 1.0 工作草案

+ +

相关链接

+ + + +

{{ languages( { "ja": "ja/DOM/window.navigator.registerContentHandler", "en": "en/DOM/window.navigator.registerContentHandler", "pl": "pl/DOM/window.navigator.registerContentHandler" } ) }}

-- cgit v1.2.3-54-g00ecf