@rescript/webapi 0.1.0-pre-alpha-fd40382 → 0.1.0-pre-alpha-02fb350
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.
- package/package.json +1 -1
- package/src/CSSFontLoadingAPI/FontFace.res +2 -2
- package/src/CanvasAPI/Path2D.res +1 -27
- package/src/ChannelMessagingAPI/MessagePort.res +1 -1
- package/src/DOMAPI/CanvasRenderingContext2D.res +32 -46
- package/src/DOMAPI/CharacterData.res +3 -3
- package/src/DOMAPI/DOMMatrix.res +1 -1
- package/src/DOMAPI/DOMMatrixReadOnly.res +1 -1
- package/src/DOMAPI/Document.res +8 -6
- package/src/DOMAPI/DocumentFragment.res +3 -3
- package/src/DOMAPI/Element.res +16 -11
- package/src/DOMAPI/HTMLCanvasElement.res +2 -0
- package/src/DOMAPI/HTMLElement.res +2 -0
- package/src/DOMAPI/HTMLImageElement.res +2 -0
- package/src/DOMAPI/HTMLInputElement.res +3 -1
- package/src/DOMAPI/HTMLSelectElement.res +1 -1
- package/src/DOMAPI/HTMLSlotElement.res +1 -1
- package/src/DOMAPI/HTMLTextAreaElement.res +1 -1
- package/src/DOMAPI/Location.res +2 -0
- package/src/DOMAPI/Navigator.res +10 -7
- package/src/DOMAPI/Node.res +2 -0
- package/src/DOMAPI/StylePropertyMap.res +2 -2
- package/src/DOMAPI/VideoFrame.res +20 -11
- package/src/DOMAPI/Window.res +29 -25
- package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +2 -2
- package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +1 -1
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +2 -1
- package/src/EventAPI/AbortController.res +2 -0
- package/src/EventAPI/AbortSignal.res +2 -0
- package/src/EventAPI/Event.res +2 -0
- package/src/EventAPI/EventTarget.res +2 -0
- package/src/EventAPI/ExtendableEvent.res +2 -0
- package/src/FileAPI/FileSystemWritableFileStream.res +4 -4
- package/src/FileAPI/ReadableStream.res +0 -12
- package/src/Global.res +23 -23
- package/src/IndexedDBAPI/IDBDatabase.res +1 -1
- package/src/IndexedDBAPI/IDBObjectStore.res +1 -1
- package/src/IntersectionObserverAPI/IntersectionObserver.res +2 -0
- package/src/IntersectionObserverAPI/IntersectionObserverRoot.res +2 -0
- package/src/MediaCaptureAndStreamsAPI/MediaStream.res +2 -2
- package/src/MutationObserverAPI/MutationObserver.res +2 -0
- package/src/PerformanceAPI/Performance.res +1 -1
- package/src/ResizeObserverAPI/ResizeObserver.res +2 -0
- package/src/ServiceWorkerAPI/Cache.res +10 -7
- package/src/ServiceWorkerAPI/ServiceWorker.res +1 -1
- package/src/UIEventsAPI/CompositionEvent.res +2 -0
- package/src/UIEventsAPI/DataTransfer.res +2 -0
- package/src/UIEventsAPI/DataTransferItem.res +2 -0
- package/src/UIEventsAPI/DataTransferItemList.res +2 -0
- package/src/UIEventsAPI/FocusEvent.res +2 -0
- package/src/UIEventsAPI/InputEvent.res +2 -0
- package/src/UIEventsAPI/KeyboardEvent.res +2 -0
- package/src/UIEventsAPI/MouseEvent.res +2 -0
- package/src/UIEventsAPI/PointerEvent.res +2 -0
- package/src/UIEventsAPI/Touch.res +2 -0
- package/src/UIEventsAPI/TouchEvent.res +2 -0
- package/src/UIEventsAPI/TouchList.res +2 -0
- package/src/UIEventsAPI/UIEvent.res +2 -0
- package/src/UIEventsAPI/WheelEvent.res +2 -0
- package/src/ViewTransitionsAPI/ViewTransition.res +2 -0
- package/src/WebAudioAPI/AudioNode.res +14 -8
- package/src/WebAudioAPI/OfflineAudioContext.res +5 -2
- package/src/WebCryptoAPI/SubtleCrypto.res +3 -3
- package/src/WebLocksAPI/LockManager.res +1 -1
- package/src/WebSocketsAPI/WebSocket.res +4 -4
- package/src/WebWorkersAPI/CacheStorage.res +1 -1
|
@@ -150,7 +150,7 @@ Throws an "InvalidStateError" DOMException if not called within an upgrade trans
|
|
|
150
150
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
|
|
151
151
|
*/
|
|
152
152
|
@send
|
|
153
|
-
external
|
|
153
|
+
external createIndexWithKeyPaths: (
|
|
154
154
|
idbObjectStore,
|
|
155
155
|
~name: string,
|
|
156
156
|
~keyPath: array<string>,
|
|
@@ -10,13 +10,13 @@ external make: unit => mediaStream = "MediaStream"
|
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
11
11
|
*/
|
|
12
12
|
@new
|
|
13
|
-
external
|
|
13
|
+
external fromStream: mediaStream => mediaStream = "MediaStream"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
17
17
|
*/
|
|
18
18
|
@new
|
|
19
|
-
external
|
|
19
|
+
external fromTracks: array<mediaStreamTrack> => mediaStream = "MediaStream"
|
|
20
20
|
|
|
21
21
|
include EventTarget.Impl({type t = mediaStream})
|
|
22
22
|
|
|
@@ -76,7 +76,7 @@ external measure: (
|
|
|
76
76
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/measure)
|
|
77
77
|
*/
|
|
78
78
|
@send
|
|
79
|
-
external
|
|
79
|
+
external measureWithOptions: (
|
|
80
80
|
performance,
|
|
81
81
|
~measureName: string,
|
|
82
82
|
~startOrMeasureOptions: performanceMeasureOptions=?,
|
|
@@ -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
|
|
16
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
17
|
+
external postMessageWithOptions: (
|
|
18
18
|
serviceWorker,
|
|
19
19
|
~message: JSON.t,
|
|
20
20
|
~options: structuredSerializeOptions=?,
|
|
@@ -2,6 +2,8 @@ open UIEventsTypes
|
|
|
2
2
|
open FileTypes
|
|
3
3
|
open FileAndDirectoryEntriesTypes
|
|
4
4
|
|
|
5
|
+
type t = dataTransferItem = {...dataTransferItem}
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
Invokes the callback with the string data as the argument, if the drag data item kind is text.
|
|
7
9
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/getAsString)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
open UIEventsTypes
|
|
2
2
|
open FileTypes
|
|
3
3
|
|
|
4
|
+
type t = dataTransferItemList = {...dataTransferItemList}
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also.
|
|
6
8
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/add)
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
54
|
-
|
|
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
|
|
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
|
|
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
|
|
16
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
51
|
+
external sendString: (webSocket, string) => unit = "send"
|