@@ -14,7 +14,7 @@ import scala.scalajs.js.typedarray.{ArrayBuffer, Uint8Array}
14
14
*
15
15
* MDN
16
16
*
17
- * The Push API is currently specified here: [[http ://www.w3.org/TR/2015 /WD-push-api-20151215 / ]]
17
+ * The Push API is currently specified here: [[https ://www.w3.org/TR/2018 /WD-push-api-20181026 / ]]
18
18
*/
19
19
@ js.native
20
20
trait PushManager extends js.Object {
@@ -79,6 +79,23 @@ trait PushSubscription extends js.Object {
79
79
*/
80
80
val endpoint : String = js.native
81
81
82
+ /**
83
+ * The expirationTime read-only property of the PushSubscription interface returns a
84
+ * DOMHighResTimeStamp of the subscription expiration time associated with the push
85
+ * subscription, if there is one, or null otherwise.
86
+ *
87
+ * MDN
88
+ */
89
+ val expirationTime : java.lang.Double = js.native
90
+
91
+ /**
92
+ * The options read-only property of the PushSubscription interface is an object containing
93
+ * containing the options used to create the subscription.
94
+ *
95
+ * MDN
96
+ */
97
+ val options : PushSubscriptionOptions = js.native
98
+
82
99
/**
83
100
* The getKey method retrieves keying material that can be used for encrypting and authenticating messages.
84
101
*/
@@ -98,7 +115,39 @@ trait PushSubscription extends js.Object {
98
115
*
99
116
* MDN
100
117
*/
101
- def toJSON (): String = 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
102
151
}
103
152
104
153
/**
0 commit comments