WebAPI/WebActivities: Difference between revisions

Jump to navigation Jump to search
Undo revision 634143 by Markg (talk)
(→‎Handle an activity request: fix mozSetMessageHandler name)
(Undo revision 634143 by Markg (talk))
Line 123: Line 123:
=== Handle an activity request ===
=== Handle an activity request ===
View a png image:
View a png image:
   navigator.mozSetMessageHandler('activity', function(a) {
   navigator.setMessageHandler('activity', function(a) {
     // We can't be handling an activity that isn't what we asked, because of |filters|.
     // We can't be handling an activity that isn't what we asked, because of |filters|.
     var i = getImageObject();
     var i = getImageObject();
Line 132: Line 132:


Pick an image:
Pick an image:
   navigator.mozSetMessageHandler('activity', function(a) {
   navigator.setMessageHandler('activity', function(a) {
     var image = getImageToReturn();
     var image = getImageToReturn();
     if (!image) {
     if (!image) {
Confirmed users
368

edits

Navigation menu