Unsere Freiwilligen haben diesen Artikel noch nicht in Deutsch übersetzt. Machen Sie mit und helfen Sie, das zu erledigen!
Summary
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.
Syntax
navigator.registerContentHandler(mimeType, uri, title);
mimeType
is the desired MIME type as a string.uri
is the URI to the handler as a string.title
is the title of the handler presented to the user as a string.
Example
navigator.registerContentHandler( "application/vnd.mozilla.maybe.feed", "https://www.example.tld/?foo=%s", "My Feed Reader" );
Notes
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).
Specifications
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of 'registerContentHandler()' in that specification. |
Living Standard |
See also
- Web-based protocol handlers
- Web activities, particularly view and open
- XPCOM Interface Reference > nsIWebContentHandlerRegistrar > registerContentHandler - This shows how to use this function XPCOM scope
Schlagwörter des Dokuments und Mitwirkende
Schlagwörter:
Mitwirkende an dieser Seite:
cvrebert,
teoli,
MHasan,
Noitidart,
def00111,
kscarfone,
iamanupmenon,
Skierpage,
Sheppy,
kmaglione,
ethertank,
mnoorenberghe,
ziyunfei,
evilpie,
Brettz9,
GijsKruitbosch,
Mgjbot,
Ptak82,
Sayrer,
Nickolay,
Waldo,
RyanFlint
Zuletzt aktualisiert von:
cvrebert,