Package-level declarations

Kotlin JavaScript wrappers for the Web Notifications API.

Kotlin JavaScript wrappers for the Web Notifications API.

Types

Link copied to clipboard
external interface GetNotificationOptions
Since Kotlin 1.1
external interface GetNotificationOptions : JsAny
Since Kotlin 1.8
Link copied to clipboard
open external class Notification(title: String, options: NotificationOptions = definedExternally) : EventTarget

Exposes the JavaScript Notification to Kotlin

Since Kotlin 1.1
open external class Notification(title: String, options: NotificationOptions = definedExternally) : EventTarget, JsAny

Exposes the JavaScript Notification to Kotlin

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

Exposes the JavaScript NotificationEvent to Kotlin

Since Kotlin 1.1
open external class NotificationEvent(type: String, eventInitDict: NotificationEventInit) : ExtendableEvent, JsAny

Exposes the JavaScript NotificationEvent to Kotlin

Since Kotlin 1.8
Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
external interface NotificationOptions
Since Kotlin 1.1
external interface NotificationOptions : JsAny
Since Kotlin 1.8
Link copied to clipboard
external interface NotificationPermission
Since Kotlin 1.1
external interface NotificationPermission : JsAny
Since Kotlin 1.8

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Since Kotlin 1.1
Since Kotlin 1.8
Link copied to clipboard
inline fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction
Since Kotlin 1.1
fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction
Since Kotlin 1.8
Link copied to clipboard
inline fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit
Since Kotlin 1.1
fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit
Since Kotlin 1.8
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
Since Kotlin 1.1
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: JsAny? = undefined, timestamp: JsNumber? = undefined, renotify: Boolean? = false, silent: Boolean? = false, noscreen: Boolean? = false, requireInteraction: Boolean? = false, sticky: Boolean? = false, data: JsAny? = null, actions: JsArray<NotificationAction>? = JsArray()): NotificationOptions
Since Kotlin 1.8