Skip to content

Commit b3cd82b

Browse files
committed
Fixes after review
1 parent 374c31f commit b3cd82b

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

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

Lines changed: 33 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,38 @@ trait PushSubscription extends js.Object {
115115
*
116116
* MDN
117117
*/
118-
def toJSON(): js.Dictionary[js.Any] = js.native
118+
def toJSON(): js.Dictionary[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+
* The endpoint contains the underlying value of the endpoint attribute.
131+
*
132+
* MDN
133+
*/
134+
def endpoint: String = js.native
135+
136+
/**
137+
* The endpoint contains the underlying value of the endpoint attribute.
138+
*
139+
* MDN
140+
*/
141+
def expirationTime: java.lang.Double = js.native
142+
143+
/**
144+
* The keys record contains an entry for each of the supported PushEncryptionKeyName entries to the URL-safe
145+
* base64 encoded representation [RFC4648] of its value.
146+
*
147+
* MDN
148+
*/
149+
def keys: js.Dictionary[String] = js.native
119150
}
120151

121152
/**

0 commit comments

Comments
 (0)