Skip to content

Commit ed19d07

Browse files
authored
Merge pull request #598 from scala-js/topic/webcrypto
Add `webcrypto`
2 parents b613096 + ec63c63 commit ed19d07

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

api-reports/2_12.txt

+1
Original file line numberDiff line numberDiff line change
@@ -25954,6 +25954,7 @@ package[SO] @js.native @JSGlobal("console") val console: Console
2595425954
package[SO] lazy val css: DeprecatedCSSAliases.type (@deprecated in 2.0.0)
2595525955
package[SO] @js.native @JSGlobal("document") val document: html.Document
2595625956
package[SO] @js.native @JSGlobal("fetch") def fetch(info: RequestInfo, init: RequestInit = null): js.Promise[Response]
25957+
package[SO] @js.native @JSGlobal("crypto") val webcrypto: Crypto
2595725958
package[SO] @js.native @JSGlobal("window") val window: Window
2595825959
raw[SO] type AbstractWorker = dom.AbstractWorker (@deprecated in 2.0.0)
2595925960
raw[SO] type AnalyserNode = dom.AnalyserNode (@deprecated in 2.0.0)

api-reports/2_13.txt

+1
Original file line numberDiff line numberDiff line change
@@ -25954,6 +25954,7 @@ package[SO] @js.native @JSGlobal("console") val console: Console
2595425954
package[SO] lazy val css: DeprecatedCSSAliases.type (@deprecated in 2.0.0)
2595525955
package[SO] @js.native @JSGlobal("document") val document: html.Document
2595625956
package[SO] @js.native @JSGlobal("fetch") def fetch(info: RequestInfo, init: RequestInit = null): js.Promise[Response]
25957+
package[SO] @js.native @JSGlobal("crypto") val webcrypto: Crypto
2595725958
package[SO] @js.native @JSGlobal("window") val window: Window
2595825959
raw[SO] type AbstractWorker = dom.AbstractWorker (@deprecated in 2.0.0)
2595925960
raw[SO] type AnalyserNode = dom.AnalyserNode (@deprecated in 2.0.0)

src/main/scala/org/scalajs/dom/package.scala

+8
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,12 @@ package object dom {
104104
*/
105105
type HashAlgorithmIdentifier = HashAlgorithm | String
106106

107+
/** This is the same as `crypto` in JS.
108+
*
109+
* To maintain backwards-source-compatibility with scala-js-dom v1, `crypto` in scala-js-dom is retained as a package
110+
* object.
111+
*/
112+
@js.native
113+
@JSGlobal("crypto")
114+
val webcrypto: Crypto = js.native
107115
}

0 commit comments

Comments
 (0)