The Wayback Machine - https://web.archive.org/web/20150911235603/https://developer.mozilla.org/ja/docs/Web/API/MozActivityRequestHandler

MozActivityRequestHandler

by 7 contributors:
この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

This API is available on Firefox or Firefox OS for installed or higher privileged applications.

Summary

The MozActivityRequestHandler interface allows apps that handle activities to access and interact with the request made by a third party app that tries to delegate an activity.

To handle activities, an application has to register a handler to the system message activity using navigator.mozSetMessageHandler(). The callback that is passed to navigator.mozSetMessageHandler() will be called with a MozActivityHandler object in parameter when the system message is of the type activity.

Interface overview

interface MozActivityRequestHandler
{
  readonly attribute MozActivityOptions source;

  void postResult(object result);
  void postError(DOMString error);
};

Properties

MozActivityRequestHandler.source Read only
A MozActivityOptions object containing all the information about the current activity request.

Methods

MozActivityRequestHandler.postResult()
Allows to send back a success response to the app that initiated the activity.
MozActivityRequestHandler.postError()
Allows to send back an error response to the app that initiated the activity.

Specification

Web Activities is not part of any specification. However, it has some overlap with the proposed Web Intents specification. Mozilla actually proposed Web Activities as a counter proposal to Web Intents. For more information about this, see discussion on the Web Intents Task Force ML.

See also

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

Contributors to this page: fscholz, jsx, kscarfone, teoli, Sheppy, Jeremie, mounirlamouri
最終更新者: fscholz,