Package org.w3c.notifications

Kotlin JavaScript wrappers for the Web Notifications API.

Types

GetNotificationOptions
Link copied to clipboard
external interface GetNotificationOptions
Notification
Link copied to clipboard
open external class Notification(title: String, options: NotificationOptions) : EventTarget

Exposes the JavaScript Notification to Kotlin

NotificationAction
Link copied to clipboard
external interface NotificationAction
NotificationDirection
Link copied to clipboard
external interface NotificationDirection
NotificationEvent
Link copied to clipboard
open external class NotificationEvent(type: String, eventInitDict: NotificationEventInit) : ExtendableEvent

Exposes the JavaScript NotificationEvent to Kotlin

NotificationEventInit
Link copied to clipboard
external interface NotificationEventInit : ExtendableEventInit
NotificationOptions
Link copied to clipboard
external interface NotificationOptions
NotificationPermission
Link copied to clipboard
external interface NotificationPermission

Functions

GetNotificationOptions
Link copied to clipboard
inline fun GetNotificationOptions(tag: String? = ""): GetNotificationOptions
NotificationAction
Link copied to clipboard
inline fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction
NotificationEventInit
Link copied to clipboard
inline fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit
NotificationOptions
Link copied to clipboard
inline fun NotificationOptions(dir: NotificationDirection? = NotificationDirection.AUTO, lang: String? = "", body: String? = "", tag: String? = "", image: String? = undefined, icon: String? = undefined, badge: String? = undefined, sound: String? = undefined, vibrate: dynamic = undefined, timestamp: Number? = undefined, renotify: Boolean? = false, silent: Boolean? = false, noscreen: Boolean? = false, requireInteraction: Boolean? = false, sticky: Boolean? = false, data: Any? = null, actions: Array<NotificationAction>? = arrayOf()): NotificationOptions

Properties

AUTO
Link copied to clipboard
DEFAULT
Link copied to clipboard
DENIED
Link copied to clipboard
GRANTED
Link copied to clipboard
LTR
Link copied to clipboard
RTL
Link copied to clipboard