@@ -98,18 +98,32 @@ interface MessageEventInit extends EventInit {
98
98
source ?: object | null ;
99
99
}
100
100
101
+ interface NotificationAction {
102
+ action : string ;
103
+ icon ?: string ;
104
+ title : string ;
105
+ }
106
+
101
107
interface NotificationEventInit extends ExtendableEventInit {
102
108
action ?: string ;
103
109
notification : Notification ;
104
110
}
105
111
106
112
interface NotificationOptions {
113
+ actions ?: NotificationAction [ ] ;
114
+ badge ?: string ;
107
115
body ?: string ;
108
116
data ?: any ;
109
117
dir ?: NotificationDirection ;
110
118
icon ?: string ;
119
+ image ?: string ;
111
120
lang ?: string ;
121
+ renotify ?: boolean ;
122
+ requireInteraction ?: boolean ;
123
+ silent ?: boolean ;
112
124
tag ?: string ;
125
+ timestamp ?: number ;
126
+ vibrate ?: VibratePattern ;
113
127
}
114
128
115
129
interface ObjectURLOptions {
@@ -995,18 +1009,25 @@ interface NotificationEventMap {
995
1009
}
996
1010
997
1011
interface Notification extends EventTarget {
998
- readonly body : string | null ;
1012
+ readonly actions : ReadonlyArray < NotificationAction > ;
1013
+ readonly badge : string ;
1014
+ readonly body : string ;
999
1015
readonly data : any ;
1000
1016
readonly dir : NotificationDirection ;
1001
- readonly icon : string | null ;
1002
- readonly lang : string | null ;
1017
+ readonly icon : string ;
1018
+ readonly image : string ;
1019
+ readonly lang : string ;
1003
1020
onclick : ( ( this : Notification , ev : Event ) => any ) | null ;
1004
1021
onclose : ( ( this : Notification , ev : Event ) => any ) | null ;
1005
1022
onerror : ( ( this : Notification , ev : Event ) => any ) | null ;
1006
1023
onshow : ( ( this : Notification , ev : Event ) => any ) | null ;
1007
- readonly permission : NotificationPermission ;
1008
- readonly tag : string | null ;
1024
+ readonly renotify : boolean ;
1025
+ readonly requireInteraction : boolean ;
1026
+ readonly silent : boolean ;
1027
+ readonly tag : string ;
1028
+ readonly timestamp : number ;
1009
1029
readonly title : string ;
1030
+ readonly vibrate : ReadonlyArray < number > ;
1010
1031
close ( ) : void ;
1011
1032
addEventListener < K extends keyof NotificationEventMap > ( type : K , listener : ( this : Notification , ev : NotificationEventMap [ K ] ) => any , options ?: boolean | AddEventListenerOptions ) : void ;
1012
1033
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options ?: boolean | AddEventListenerOptions ) : void ;
@@ -1017,7 +1038,9 @@ interface Notification extends EventTarget {
1017
1038
declare var Notification : {
1018
1039
prototype : Notification ;
1019
1040
new ( title : string , options ?: NotificationOptions ) : Notification ;
1020
- requestPermission ( callback ?: NotificationPermissionCallback ) : Promise < NotificationPermission > ;
1041
+ readonly maxActions : number ;
1042
+ readonly permission : NotificationPermission ;
1043
+ requestPermission ( deprecatedCallback ?: NotificationPermissionCallback ) : Promise < NotificationPermission > ;
1021
1044
} ;
1022
1045
1023
1046
interface NotificationEvent extends ExtendableEvent {
@@ -1195,7 +1218,6 @@ declare var PushEvent: {
1195
1218
} ;
1196
1219
1197
1220
interface PushManager {
1198
- readonly supportedContentEncodings : ReadonlyArray < string > ;
1199
1221
getSubscription ( ) : Promise < PushSubscription | null > ;
1200
1222
permissionState ( options ?: PushSubscriptionOptionsInit ) : Promise < PushPermissionState > ;
1201
1223
subscribe ( options ?: PushSubscriptionOptionsInit ) : Promise < PushSubscription > ;
@@ -1204,6 +1226,7 @@ interface PushManager {
1204
1226
declare var PushManager : {
1205
1227
prototype : PushManager ;
1206
1228
new ( ) : PushManager ;
1229
+ readonly supportedContentEncodings : ReadonlyArray < string > ;
1207
1230
} ;
1208
1231
1209
1232
interface PushMessageData {
@@ -1782,6 +1805,7 @@ type BodyInit = Blob | BufferSource | FormData | URLSearchParams | ReadableStrea
1782
1805
type RequestInfo = Request | string ;
1783
1806
type PerformanceEntryList = PerformanceEntry [ ] ;
1784
1807
type PushMessageDataInit = BufferSource | string ;
1808
+ type VibratePattern = number | number [ ] ;
1785
1809
type BufferSource = ArrayBufferView | ArrayBuffer ;
1786
1810
type FormDataEntryValue = File | string ;
1787
1811
type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey ;
0 commit comments