@rescript/webapi 0.1.0-pre-alpha-fd40382 → 0.1.0-pre-alpha-4ffc5e2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/src/CSSFontLoadingAPI/FontFace.res +2 -2
  3. package/src/CanvasAPI/Path2D.res +1 -27
  4. package/src/ChannelMessagingAPI/MessagePort.res +1 -1
  5. package/src/DOMAPI/CanvasRenderingContext2D.res +32 -46
  6. package/src/DOMAPI/CharacterData.res +3 -3
  7. package/src/DOMAPI/DOMMatrix.res +1 -1
  8. package/src/DOMAPI/DOMMatrixReadOnly.res +1 -1
  9. package/src/DOMAPI/Document.res +6 -6
  10. package/src/DOMAPI/DocumentFragment.res +3 -3
  11. package/src/DOMAPI/Element.res +14 -11
  12. package/src/DOMAPI/HTMLInputElement.res +1 -1
  13. package/src/DOMAPI/HTMLSelectElement.res +1 -1
  14. package/src/DOMAPI/HTMLSlotElement.res +1 -1
  15. package/src/DOMAPI/HTMLTextAreaElement.res +1 -1
  16. package/src/DOMAPI/Navigator.res +10 -7
  17. package/src/DOMAPI/StylePropertyMap.res +2 -2
  18. package/src/DOMAPI/VideoFrame.res +20 -11
  19. package/src/DOMAPI/Window.res +28 -24
  20. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +2 -2
  21. package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +1 -1
  22. package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +2 -1
  23. package/src/FileAPI/FileSystemWritableFileStream.res +4 -4
  24. package/src/FileAPI/ReadableStream.res +0 -12
  25. package/src/Global.res +23 -23
  26. package/src/IndexedDBAPI/IDBDatabase.res +1 -1
  27. package/src/IndexedDBAPI/IDBObjectStore.res +1 -1
  28. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +2 -2
  29. package/src/PerformanceAPI/Performance.res +1 -1
  30. package/src/ServiceWorkerAPI/Cache.res +10 -7
  31. package/src/ServiceWorkerAPI/ServiceWorker.res +1 -1
  32. package/src/WebAudioAPI/AudioNode.res +14 -8
  33. package/src/WebAudioAPI/OfflineAudioContext.res +5 -2
  34. package/src/WebCryptoAPI/SubtleCrypto.res +3 -3
  35. package/src/WebLocksAPI/LockManager.res +1 -1
  36. package/src/WebSocketsAPI/WebSocket.res +4 -4
  37. package/src/WebWorkersAPI/CacheStorage.res +1 -1
@@ -12,8 +12,11 @@ external match: (cache, ~request: request, ~options: cacheQueryOptions=?) => Nul
12
12
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match)
13
13
  */
14
14
  @send
15
- external match2: (cache, ~request: string, ~options: cacheQueryOptions=?) => Nullable.t<response> =
16
- "match"
15
+ external matchByUrl: (
16
+ cache,
17
+ ~request: string,
18
+ ~options: cacheQueryOptions=?,
19
+ ) => Nullable.t<response> = "match"
17
20
 
18
21
  /**
19
22
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll)
@@ -29,7 +32,7 @@ external matchAll: (
29
32
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll)
30
33
  */
31
34
  @send
32
- external matchAll2: (
35
+ external matchAllByUrl: (
33
36
  cache,
34
37
  ~request: string=?,
35
38
  ~options: cacheQueryOptions=?,
@@ -45,7 +48,7 @@ external add: (cache, request) => promise<unit> = "add"
45
48
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add)
46
49
  */
47
50
  @send
48
- external add2: (cache, string) => promise<unit> = "add"
51
+ external addByUrl: (cache, string) => promise<unit> = "add"
49
52
 
50
53
  /**
51
54
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
@@ -63,7 +66,7 @@ external put: (cache, ~request: request, ~response: response) => promise<unit> =
63
66
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put)
64
67
  */
65
68
  @send
66
- external put2: (cache, ~request: string, ~response: response) => promise<unit> = "put"
69
+ external putByUrl: (cache, ~request: string, ~response: response) => promise<unit> = "put"
67
70
 
68
71
  /**
69
72
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete)
@@ -76,7 +79,7 @@ external delete: (cache, ~request: request, ~options: cacheQueryOptions=?) => pr
76
79
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete)
77
80
  */
78
81
  @send
79
- external delete2: (cache, ~request: string, ~options: cacheQueryOptions=?) => promise<bool> =
82
+ external deleteByUrl: (cache, ~request: string, ~options: cacheQueryOptions=?) => promise<bool> =
80
83
  "delete"
81
84
 
82
85
  /**
@@ -93,7 +96,7 @@ external keys: (
93
96
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/keys)
94
97
  */
95
98
  @send
96
- external keys2: (
99
+ external keysByUrl: (
97
100
  cache,
98
101
  ~request: string=?,
99
102
  ~options: cacheQueryOptions=?,
@@ -14,7 +14,7 @@ external postMessage: (serviceWorker, ~message: JSON.t, ~transfer: array<Dict.t<
14
14
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorker/postMessage)
15
15
  */
16
16
  @send
17
- external postMessage2: (
17
+ external postMessageWithOptions: (
18
18
  serviceWorker,
19
19
  ~message: JSON.t,
20
20
  ~options: structuredSerializeOptions=?,
@@ -20,7 +20,7 @@ module Impl = (
20
20
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
21
21
  */
22
22
  @send
23
- external connect2: (T.t, ~destinationParam: audioParam, ~output: int=?) => unit = "connect"
23
+ external connectParam: (T.t, ~destinationParam: audioParam, ~output: int=?) => unit = "connect"
24
24
 
25
25
  /**
26
26
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
@@ -32,36 +32,42 @@ module Impl = (
32
32
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
33
33
  */
34
34
  @send
35
- external disconnect2: (T.t, int) => unit = "disconnect"
35
+ external disconnectOutput: (T.t, int) => unit = "disconnect"
36
36
 
37
37
  /**
38
38
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
39
39
  */
40
40
  @send
41
- external disconnect3: (T.t, audioNode) => unit = "disconnect"
41
+ external disconnectNode: (T.t, audioNode) => unit = "disconnect"
42
42
 
43
43
  /**
44
44
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
45
45
  */
46
46
  @send
47
- external disconnect4: (T.t, ~destinationNode: audioNode, ~output: int) => unit = "disconnect"
47
+ external disconnectNodeOutput: (T.t, ~destinationNode: audioNode, ~output: int) => unit =
48
+ "disconnect"
48
49
 
49
50
  /**
50
51
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
51
52
  */
52
53
  @send
53
- external disconnect5: (T.t, ~destinationNode: audioNode, ~output: int, ~input: int) => unit =
54
- "disconnect"
54
+ external disconnectNodeOutputInput: (
55
+ T.t,
56
+ ~destinationNode: audioNode,
57
+ ~output: int,
58
+ ~input: int,
59
+ ) => unit = "disconnect"
55
60
 
56
61
  /**
57
62
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
58
63
  */
59
64
  @send
60
- external disconnect6: (T.t, audioParam) => unit = "disconnect"
65
+ external disconnectParam: (T.t, audioParam) => unit = "disconnect"
61
66
 
62
67
  /**
63
68
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
64
69
  */
65
70
  @send
66
- external disconnect7: (T.t, ~destinationParam: audioParam, ~output: int) => unit = "disconnect"
71
+ external disconnectParamOutput: (T.t, ~destinationParam: audioParam, ~output: int) => unit =
72
+ "disconnect"
67
73
  }
@@ -12,8 +12,11 @@ external make: offlineAudioContextOptions => offlineAudioContext = "OfflineAudio
12
12
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext)
13
13
  */
14
14
  @new
15
- external make2: (~numberOfChannels: int, ~length: int, ~sampleRate: float) => offlineAudioContext =
16
- "OfflineAudioContext"
15
+ external makeWithParams: (
16
+ ~numberOfChannels: int,
17
+ ~length: int,
18
+ ~sampleRate: float,
19
+ ) => offlineAudioContext = "OfflineAudioContext"
17
20
 
18
21
  /**
19
22
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/startRendering)
@@ -71,7 +71,7 @@ external generateKey: (
71
71
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
72
72
  */
73
73
  @send
74
- external generateKey2: (
74
+ external generateKeyWithAlgorithmName: (
75
75
  subtleCrypto,
76
76
  ~algorithm: string,
77
77
  ~extractable: bool,
@@ -106,7 +106,7 @@ external deriveBits: (
106
106
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
107
107
  */
108
108
  @send
109
- external deriveBits2: (
109
+ external deriveBitsWithAlgorithmName: (
110
110
  subtleCrypto,
111
111
  ~algorithm: string,
112
112
  ~baseKey: cryptoKey,
@@ -149,7 +149,7 @@ external wrapKey: (
149
149
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
150
150
  */
151
151
  @send
152
- external wrapKey2: (
152
+ external wrapKeyWithAlgorithmName: (
153
153
  subtleCrypto,
154
154
  ~format: keyFormat,
155
155
  ~key: cryptoKey,
@@ -11,7 +11,7 @@ external request: (lockManager, ~name: string, ~callback: lockGrantedCallback) =
11
11
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/LockManager/request)
12
12
  */
13
13
  @send
14
- external request2: (
14
+ external requestWithOptions: (
15
15
  lockManager,
16
16
  ~name: string,
17
17
  ~options: lockOptions,
@@ -11,7 +11,7 @@ external make: (~url: string, ~protocols: string=?) => webSocket = "WebSocket"
11
11
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket)
12
12
  */
13
13
  @new
14
- external make2: (~url: string, ~protocols: array<string>=?) => webSocket = "WebSocket"
14
+ external makeWithProtocols: (~url: string, ~protocols: array<string>=?) => webSocket = "WebSocket"
15
15
 
16
16
  include EventTarget.Impl({type t = webSocket})
17
17
 
@@ -34,18 +34,18 @@ Transmits data using the WebSocket connection. data can be a string, a Blob, an
34
34
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
35
35
  */
36
36
  @send
37
- external send2: (webSocket, ArrayBuffer.t) => unit = "send"
37
+ external sendArrayBuffer: (webSocket, ArrayBuffer.t) => unit = "send"
38
38
 
39
39
  /**
40
40
  Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
41
41
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
42
42
  */
43
43
  @send
44
- external send3: (webSocket, blob) => unit = "send"
44
+ external sendBlob: (webSocket, blob) => unit = "send"
45
45
 
46
46
  /**
47
47
  Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
48
48
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
49
49
  */
50
50
  @send
51
- external send4: (webSocket, string) => unit = "send"
51
+ external sendString: (webSocket, string) => unit = "send"
@@ -15,7 +15,7 @@ external match: (
15
15
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match)
16
16
  */
17
17
  @send
18
- external match2: (
18
+ external matchByUrl: (
19
19
  cacheStorage,
20
20
  ~request: string,
21
21
  ~options: multiCacheQueryOptions=?,