MozActivityRequestHandler.source

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

Summary

The source property returns a MozActivityOptions object, which provides information about the activity request.

Syntax

JavaScript
navigator.mozSetMessageHandler('activity', function(aRequestHandler) {
  var activityOptions = aRequestHandler.source;
  if (activityOptions.name == 'share') {
    handleShare();
  } else if (activityOptions.name == 'view') {
    handleView();
  }
});

Value

Return a MozActivityOptions object.

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

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/mozactivityrequesthandler/source

API B2G Firefox OS Property Reference Référence Web Activities WebAPI