Confirmed users
368
edits
(→More information: add a declarative registration sub-section) |
m (→Launch an activity: fix typo) |
||
Line 88: | Line 88: | ||
var a = new Activity({ name: "pick", data: { type: "image/png", multiple: false }}); | var a = new Activity({ name: "pick", data: { type: "image/png", multiple: false }}); | ||
a.onsuccess = function() { var image = a.result; doSomethingWithImage(image); }); | a.onsuccess = function() { var image = a.result; doSomethingWithImage(image); }); | ||
a. | a.onerror = function() { alert("Failure when trying to pick an image!"); }); | ||
=== Register to handle an activity === | === Register to handle an activity === |