IOverwolfCRNApi
Electron APIs / CRN / IOverwolfCRNApi
Interface for interacting with the Overwolf Content Recommendation Notification (CRN) system.
Provides methods to query notification state, control visibility, and respond to notification events.
Methods
allowNotifications()
allowNotifications(enable: boolean): void;
Enable or disable notifications.
Parameters
Parameter | Type | Description |
---|---|---|
enable | boolean | true to enable notifications, false to disable. |
Returns
void
closeNotificationWindow()
closeNotificationWindow(): void;
Closes the notification.
Returns
void
getNotificationStatus()
getNotificationStatus(): Promise<boolean>;
Returns Notification settings status.
true
if notifications are allowed, false
if not.
Returns
Promise
<boolean
>
isNotificationVisible()
isNotificationVisible(): Promise<boolean>;
Returns Notification visible status.
true
if the notification is currently visible, false
if not.
Returns
Promise
<boolean
>
on("before-notification")
on(eventName: "before-notification", listener: (event: ICRNEvent, args: any) => void): this;
Fired before a notification is shown.
Parameters
Parameter | Type | Description |
---|---|---|
eventName | "before-notification" | |
listener | (event : ICRNEvent , args : any ) => void |
Returns
this
on("notification-action")
on(eventName: "notification-action", listener: (event: CRNActionType) => void): this;
Fired when a notification action is triggered.
Parameters
Parameter | Type | Description |
---|---|---|
eventName | "notification-action" | |
listener | (event : CRNActionType ) => void |
Returns
this