Package org.w3c.notifications
Kotlin JavaScript wrappers for the Web Notifications API .
Types
GetNotificationOptions
interface
GetNotificationOptions
Notification
Exposes the JavaScript Notification to Kotlin
open
class
Notification
:
EventTarget
NotificationAction
interface
NotificationAction
NotificationDirection
interface
NotificationDirection
NotificationEvent
Exposes the JavaScript NotificationEvent to Kotlin
open
class
NotificationEvent
:
ExtendableEvent
NotificationEventInit
interface
NotificationEventInit
:
ExtendableEventInit
NotificationOptions
interface
NotificationOptions
NotificationPermission
interface
NotificationPermission
Functions
GetNotificationOptions
fun
GetNotificationOptions
(
tag
:
String
?
=
""
)
:
GetNotificationOptions
NotificationAction
fun
NotificationAction
(
action
:
String
?
,
title
:
String
?
,
icon
:
String
?
=
undefined
)
:
NotificationAction
NotificationEventInit
fun
NotificationEventInit
(
notification
:
Notification
?
,
action
:
String
?
=
""
,
bubbles
:
Boolean
?
=
false
,
cancelable
:
Boolean
?
=
false
,
composed
:
Boolean
?
=
false
)
:
NotificationEventInit
NotificationOptions
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
Companion Object Properties
AUTO
val
NotificationDirection.Companion
.
AUTO
:
NotificationDirection
DEFAULT
val
NotificationPermission.Companion
.
DEFAULT
:
NotificationPermission
DENIED
val
NotificationPermission.Companion
.
DENIED
:
NotificationPermission
GRANTED
val
NotificationPermission.Companion
.
GRANTED
:
NotificationPermission
LTR
val
NotificationDirection.Companion
.
LTR
:
NotificationDirection
RTL
val
NotificationDirection.Companion
.
RTL
:
NotificationDirection