Javascript Event System - play-page-before-delete

From KickApps Documentation

Jump to: navigation, search

This article pertains to the Javascript Event System. You can refer to our list of Javascript Event System Supported Events to learn what else you can do with our event system.

Contents

Summary

This event is fired after a member clicks "Delete Media" and before the request is submitted.

Payload Parameters

mediaType
(string) Type of media being deleted.
mediaId
(number) ID of the media item being deleted.

Execution Interruption

If your event handler returns false, the execution will halt and the media will not be deleted.

Example

function onBeforeDeleteMedia(data) {

   // do something here
   console.log(data.mediaType, data.mediaId);

} var newEventId = Ka.events.listen('play-page-before-delete', onBeforeDeleteMedia);