Skip to content

Commit 256d1bd

Browse files
committed
Fixes after review
1 parent 374c31f commit 256d1bd

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ trait PushSubscription extends js.Object {
8686
*
8787
* MDN
8888
*/
89-
val expirationTime: Double = js.native
89+
val expirationTime: java.lang.Double = js.native
9090

9191
/**
9292
* The options read-only property of the PushSubscription interface is an object containing
@@ -115,7 +115,39 @@ trait PushSubscription extends js.Object {
115115
*
116116
* MDN
117117
*/
118-
def toJSON(): js.Dictionary[js.Any] = js.native
118+
def toJSON(): PushSubscriptionJSON = js.native
119+
}
120+
121+
/**
122+
* A PushSubscriptionJSON dictionary represents the JSON type of a PushSubscription. In ECMAScript this can
123+
* be converted into a JSON string through the JSON.stringify function.
124+
*
125+
* MDN
126+
*/
127+
@js.native
128+
trait PushSubscriptionJSON extends js.Object {
129+
130+
/**
131+
* The endpoint contains the underlying value of the endpoint attribute.
132+
*
133+
* MDN
134+
*/
135+
val endpoint: String = js.native
136+
137+
/**
138+
* The endpoint contains the underlying value of the endpoint attribute.
139+
*
140+
* MDN
141+
*/
142+
val expirationTime: java.lang.Double = js.native
143+
144+
/**
145+
* The keys record contains an entry for each of the supported PushEncryptionKeyName entries to the URL-safe
146+
* base64 encoded representation [RFC4648] of its value.
147+
*
148+
* MDN
149+
*/
150+
val keys: js.Dictionary[String] = js.native
119151
}
120152

121153
/**

0 commit comments

Comments
 (0)