Skip to main content

ICRNEvent

Electron APIs / crn / ICRNEvent

Used to create cancellable or abortable event.

Example

crnApi.on("before-notification", (event: ICRNEvent, args) => {
// Check if the notification should be shown
if (!shouldShowNotification(args)) {
event.abort();
}
});

Properties

PropertyTypeDescription
abort() => voidCancels the ongoing event, stopping its propagation or execution.