• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. MozActivityRequestHandler
  6. MozActivityRequestHandler.source

MozActivityRequestHandler.source

In This Article
  1. Summary
  2. Syntax
  3. Value
  4. Specification
  5. See also

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

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

  • MozActivityRequestHandler
  • Web Activities

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • Firefox OS
  • Non Standard
  • Property
  • Reference
  • Référence
  • Web Activities
  • WebAPI
 Contributors to this page: chrisdavidmills, fscholz, jsx, kscarfone, Sheppy, mounirlamouri, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:33:58 AM
See also
  1. Web Activities
  2. Archive
  3. Related pages for Web Activities
    1. MozActivity
    2. MozActivityOptions
    3. MozActivityRequestHandler