Package org.w3c.notifications
Kotlin JavaScript wrappers for the Web Notifications API.
Types
GetNotificationOptions
interface GetNotificationOptionsNotification
Exposes the JavaScript Notification to Kotlin
open class Notification : EventTargetNotificationAction
interface NotificationActionNotificationDirection
interface NotificationDirectionNotificationEvent
Exposes the JavaScript NotificationEvent to Kotlin
open class NotificationEvent : ExtendableEventNotificationEventInit
interface NotificationEventInit : ExtendableEventInitNotificationOptions
interface NotificationOptionsNotificationPermission
interface NotificationPermissionFunctions
GetNotificationOptions
fun GetNotificationOptions(
tag: String? = ""
): GetNotificationOptionsNotificationAction
fun NotificationAction(
action: String?,
title: String?,
icon: String? = undefined
): NotificationActionNotificationEventInit
fun NotificationEventInit(
notification: Notification?,
action: String? = "",
bubbles: Boolean? = false,
cancelable: Boolean? = false,
composed: Boolean? = false
): NotificationEventInitNotificationOptions
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()
): NotificationOptionsCompanion Object Properties
AUTO
val NotificationDirection.Companion.AUTO: NotificationDirectionDEFAULT
val NotificationPermission.Companion.DEFAULT: NotificationPermissionDENIED
val NotificationPermission.Companion.DENIED: NotificationPermissionGRANTED
val NotificationPermission.Companion.GRANTED: NotificationPermissionLTR
val NotificationDirection.Companion.LTR: NotificationDirectionRTL
val NotificationDirection.Companion.RTL: NotificationDirection