snap_cancelBackgroundEvent
Description
Cancel a background event created by
snap_scheduleBackgroundEvent.
Parameters
object
The request parameters for the snap_cancelBackgroundEvent method.
id
stringThe ID of the background event to cancel.
Returns
null
The result returned for the snap_cancelBackgroundEvent method.
This method does not return anything.
Example
const id = snap.request({
method: "snap_scheduleBackgroundEvent",
params: {
// ...
},
});
// Later, when you want to cancel the background event:
snap.request({
method: "snap_cancelBackgroundEvent",
params: { id },
});