@rescript/webapi 0.1.0-experimental-2d6efc2 → 0.1.0-experimental-0781ac8
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/README.md +10 -5
- package/package.json +6 -4
- package/rescript.json +591 -4
- package/src/Base/ArrayBufferTypedArrayOrDataView.res +4 -0
- package/src/Base/BaseCSSFontLoading.res +25 -0
- package/src/{EncryptedMediaExtensionsAPI.res → Base/BaseEncryptedMediaExtensions.res} +12 -18
- package/src/Base/BaseEvent.res +6 -0
- package/src/Base/BaseFile.res +37 -0
- package/src/{FileAndDirectoryEntriesAPI.res → Base/BaseFileAndDirectoryEntries.res} +5 -22
- package/src/{DOMAPI.res → Base/DOM.res} +225 -2237
- package/src/{CSSFontLoadingAPI.res → CSSFontLoading/CssFontLoadingTypes.res} +4 -15
- package/src/CSSFontLoading/FontFace.res +62 -0
- package/src/CSSFontLoading/FontFaceSet.res +38 -0
- package/src/Canvas/Canvas.res +179 -0
- package/src/{CanvasAPI → Canvas}/CanvasGradient.res +2 -3
- package/src/{CanvasAPI → Canvas}/CanvasPattern.res +3 -3
- package/src/{DOMAPI → Canvas}/CanvasRenderingContext2D.res +178 -140
- package/src/{CanvasAPI.res → Canvas/CanvasTypes.res} +9 -11
- package/src/Canvas/FillStyle.res +25 -0
- package/src/{DOMAPI → Canvas}/HTMLCanvasElement.res +21 -23
- package/src/{CanvasAPI → Canvas}/ImageBitmap.res +1 -3
- package/src/{CanvasAPI → Canvas}/ImageBitmapRenderingContext.res +4 -4
- package/src/{CanvasAPI → Canvas}/OffscreenCanvas.res +19 -19
- package/src/{CanvasAPI → Canvas}/Path2D.res +63 -19
- package/src/Canvas/VideoFrame.res +223 -0
- package/src/{ChannelMessagingAPI.res → ChannelMessaging/ChannelMessagingTypes.res} +2 -4
- package/src/{ChannelMessagingAPI → ChannelMessaging}/MessagePort.res +8 -10
- package/src/Clipboard/Clipboard.res +29 -0
- package/src/{ClipboardAPI → Clipboard}/ClipboardItem.res +5 -6
- package/src/{ClipboardAPI.res → Clipboard/ClipboardTypes.res} +5 -7
- package/src/{CredentialManagementAPI.res → CredentialManagement/CredentialManagementTypes.res} +10 -13
- package/src/CredentialManagement/CredentialsContainer.res +33 -0
- package/src/{DOMAPI → DOM}/Animation.res +13 -13
- package/src/{DOMAPI → DOM}/AnimationEffect.res +7 -5
- package/src/{DOMAPI → DOM}/CSSRuleList.res +1 -3
- package/src/{DOMAPI → DOM}/CSSStyleDeclaration.res +6 -7
- package/src/DOM/CSSStyleSheet.res +30 -0
- package/src/{DOMAPI → DOM}/CSSStyleValue.res +3 -4
- package/src/DOM/CaretPosition.res +2 -0
- package/src/{DOMAPI → DOM}/CharacterData.res +5 -7
- package/src/DOM/Comment.res +7 -0
- package/src/{DOMAPI → DOM}/CustomElementRegistry.res +10 -9
- package/src/DOM/DOMException.res +7 -0
- package/src/{DOMAPI → DOM}/DOMImplementation.res +6 -8
- package/src/DOM/DOMMatrix.res +228 -0
- package/src/DOM/DOMMatrixReadOnly.res +147 -0
- package/src/DOM/DOMPoint.res +31 -0
- package/src/{DOMAPI → DOM}/DOMPointReadOnly.res +7 -7
- package/src/{DOMAPI → DOM}/DOMRect.res +6 -7
- package/src/DOM/DOMRectList.res +2 -0
- package/src/DOM/DOMRectReadOnly.res +19 -0
- package/src/{Prelude → DOM}/DOMStringList.res +3 -3
- package/src/{DOMAPI → DOM}/DOMTokenList.res +7 -9
- package/src/{DOMAPI → DOM}/Document.res +94 -80
- package/src/{DOMAPI → DOM}/DocumentFragment.res +10 -11
- package/src/DOM/DocumentTimeline.res +8 -0
- package/src/{Global.res → DOM/DomGlobal.res} +62 -285
- package/src/{DOMAPI/HTMLMediaElement.res → DOM/DomHTMLMediaElement.res} +6 -16
- package/src/DOM/DomTypes.res +2105 -0
- package/src/{DOMAPI → DOM}/Element.res +53 -44
- package/src/{DOMAPI → DOM}/ElementInternals.res +6 -8
- package/src/{DOMAPI → DOM}/FileList.res +2 -5
- package/src/DOM/HTMLAnchorElement.res +1 -0
- package/src/DOM/HTMLAreaElement.res +1 -0
- package/src/DOM/HTMLAudioElement.res +1 -0
- package/src/DOM/HTMLBRElement.res +1 -0
- package/src/DOM/HTMLBaseElement.res +1 -0
- package/src/DOM/HTMLBodyElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLButtonElement.res +4 -6
- package/src/{DOMAPI → DOM}/HTMLCollection.res +2 -4
- package/src/DOM/HTMLDListElement.res +1 -0
- package/src/DOM/HTMLDataElement.res +1 -0
- package/src/DOM/HTMLDataListElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLDialogElement.res +4 -6
- package/src/DOM/HTMLDivElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLElement.res +5 -5
- package/src/DOM/HTMLEmbedElement.res +4 -0
- package/src/{DOMAPI → DOM}/HTMLFieldSetElement.res +4 -6
- package/src/DOM/HTMLFormControlsCollection.res +16 -0
- package/src/{DOMAPI → DOM}/HTMLFormElement.res +7 -7
- package/src/DOM/HTMLFrameSetElement.res +1 -0
- package/src/DOM/HTMLHRElement.res +1 -0
- package/src/DOM/HTMLHeadElement.res +1 -0
- package/src/DOM/HTMLHeadingElement.res +1 -0
- package/src/DOM/HTMLHtmlElement.res +1 -0
- package/src/DOM/HTMLIFrameElement.res +4 -0
- package/src/DOM/HTMLImageElement.res +7 -0
- package/src/{DOMAPI → DOM}/HTMLInputElement.res +12 -14
- package/src/DOM/HTMLLIElement.res +1 -0
- package/src/DOM/HTMLLabelElement.res +1 -0
- package/src/DOM/HTMLLegendElement.res +1 -0
- package/src/DOM/HTMLLinkElement.res +1 -0
- package/src/DOM/HTMLMapElement.res +1 -0
- package/src/DOM/HTMLMenuElement.res +1 -0
- package/src/DOM/HTMLMetaElement.res +1 -0
- package/src/DOM/HTMLMeterElement.res +1 -0
- package/src/DOM/HTMLModElement.res +1 -0
- package/src/DOM/HTMLOListElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLObjectElement.res +5 -7
- package/src/DOM/HTMLOptGroupElement.res +1 -0
- package/src/DOM/HTMLOptionElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLOptionsCollection.res +4 -5
- package/src/{DOMAPI → DOM}/HTMLOutputElement.res +4 -6
- package/src/DOM/HTMLParagraphElement.res +1 -0
- package/src/DOM/HTMLPictureElement.res +1 -0
- package/src/DOM/HTMLPreElement.res +1 -0
- package/src/DOM/HTMLProgressElement.res +1 -0
- package/src/DOM/HTMLQuoteElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLScriptElement.res +1 -3
- package/src/{DOMAPI → DOM}/HTMLSelectElement.res +10 -12
- package/src/DOM/HTMLSlotElement.res +31 -0
- package/src/DOM/HTMLSourceElement.res +1 -0
- package/src/DOM/HTMLSpanElement.res +1 -0
- package/src/DOM/HTMLStyleElement.res +1 -0
- package/src/DOM/HTMLTableCaptionElement.res +1 -0
- package/src/DOM/HTMLTableCellElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLTableElement.res +12 -12
- package/src/{DOMAPI → DOM}/HTMLTableRowElement.res +6 -5
- package/src/{DOMAPI → DOM}/HTMLTableSectionElement.res +6 -5
- package/src/DOM/HTMLTemplateElement.res +1 -0
- package/src/{DOMAPI → DOM}/HTMLTextAreaElement.res +9 -11
- package/src/DOM/HTMLTimeElement.res +1 -0
- package/src/DOM/HTMLTitleElement.res +1 -0
- package/src/DOM/HTMLTrackElement.res +1 -0
- package/src/DOM/HTMLUListElement.res +1 -0
- package/src/DOM/HTMLVideoElement.res +32 -0
- package/src/{DOMAPI → DOM}/IdleDeadline.res +1 -3
- package/src/{DOMAPI → DOM}/ImageData.res +4 -5
- package/src/{DOMAPI → DOM}/Location.res +3 -5
- package/src/{DOMAPI → DOM}/MediaList.res +3 -5
- package/src/DOM/MediaQueryList.res +1 -0
- package/src/{DOMAPI → DOM}/NamedNodeMap.res +15 -11
- package/src/DOM/Navigator.res +166 -0
- package/src/{DOMAPI → DOM}/Node.res +10 -11
- package/src/DOM/NodeFilter.res +2 -0
- package/src/{DOMAPI → DOM}/NodeIterator.res +2 -4
- package/src/{DOMAPI → DOM}/NodeList.res +1 -3
- package/src/{DOMAPI → DOM}/Range.res +27 -27
- package/src/DOM/SVGGraphicsElement.res +18 -0
- package/src/{DOMAPI → DOM}/SVGLength.res +2 -4
- package/src/DOM/ScreenOrientation.res +7 -0
- package/src/{DOMAPI → DOM}/Selection.res +22 -20
- package/src/DOM/ShadowRoot.res +19 -0
- package/src/DOM/StylePropertyMap.res +57 -0
- package/src/{DOMAPI → DOM}/StylePropertyMapReadOnly.res +3 -4
- package/src/{DOMAPI → DOM}/StyleSheetList.res +1 -3
- package/src/{DOMAPI → DOM}/Text.res +3 -5
- package/src/DOM/TextTrackList.res +7 -0
- package/src/{DOMAPI → DOM}/TimeRanges.res +2 -4
- package/src/{DOMAPI → DOM}/TreeWalker.res +7 -9
- package/src/{DOMAPI → DOM}/VideoColorSpace.res +3 -4
- package/src/DOM/Window.res +557 -0
- package/src/{DOMAPI → DOM}/XPathExpression.res +4 -6
- package/src/{DOMAPI → DOM}/XPathResult.res +2 -4
- package/src/EncryptedMediaExtensions/EncryptedMediaExtensionsHTMLMediaElement.res +15 -0
- package/src/EncryptedMediaExtensions/EncryptedMediaExtensionsTypes.res +43 -0
- package/src/{EncryptedMediaExtensionsAPI → EncryptedMediaExtensions}/MediaKeySession.res +10 -10
- package/src/{EncryptedMediaExtensionsAPI → EncryptedMediaExtensions}/MediaKeyStatusMap.res +2 -4
- package/src/EncryptedMediaExtensions/MediaKeySystemAccess.res +14 -0
- package/src/EncryptedMediaExtensions/MediaKeys.res +35 -0
- package/src/{EventAPI → Event}/AbortController.res +2 -4
- package/src/{EventAPI → Event}/AbortSignal.res +5 -7
- package/src/{EventAPI → Event}/Event.res +5 -6
- package/src/{EventAPI → Event}/EventTarget.res +14 -16
- package/src/{EventAPI.res → Event/EventTypes.res} +10 -10
- package/src/{EventAPI → Event}/ExtendableEvent.res +2 -4
- package/src/{FetchAPI → Fetch}/BodyInit.res +10 -12
- package/src/Fetch/Fetch.res +12 -0
- package/src/{FetchAPI.res → Fetch/FetchTypes.res} +19 -21
- package/src/{FetchAPI → Fetch}/FormData.res +16 -15
- package/src/Fetch/FormDataEntryValue.res +2 -0
- package/src/{FetchAPI → Fetch}/Headers.res +10 -12
- package/src/{FetchAPI → Fetch}/HeadersInit.res +4 -4
- package/src/{FetchAPI → Fetch}/Request.res +16 -11
- package/src/{FetchAPI → Fetch}/Response.res +27 -23
- package/src/{FileAPI → File}/Blob.res +9 -7
- package/src/{FileAPI → File}/File.res +5 -5
- package/src/File/FileSystemDirectoryHandle.res +49 -0
- package/src/File/FileSystemFileHandle.res +25 -0
- package/src/File/FileSystemHandle.res +6 -0
- package/src/File/FileSystemWritableFileStream.res +65 -0
- package/src/{FileAPI.res → File/FileTypes.res} +22 -23
- package/src/File/ReadableStream.res +79 -0
- package/src/File/WritableStream.res +27 -0
- package/src/{FileAPI → File}/WritableStreamDefaultController.res +1 -3
- package/src/FileAndDirectoryEntries/FileAndDirectoryEntriesTypes.res +35 -0
- package/src/FileAndDirectoryEntries/FileSystemDirectoryEntry.res +42 -0
- package/src/FileAndDirectoryEntries/FileSystemDirectoryReader.res +9 -0
- package/src/FileAndDirectoryEntries/FileSystemEntry.res +9 -0
- package/src/Gamepad/GamepadHapticActuator.res +16 -0
- package/src/{GamepadAPI.res → Gamepad/GamepadTypes.res} +4 -4
- package/src/Geolocation/Geolocation.res +31 -0
- package/src/{GeolocationAPI → Geolocation}/GeolocationCoordinates.res +1 -3
- package/src/{GeolocationAPI → Geolocation}/GeolocationPosition.res +1 -3
- package/src/{GeolocationAPI.res → Geolocation/GeolocationTypes.res} +5 -5
- package/src/{HistoryAPI → History}/History.res +13 -8
- package/src/{HistoryAPI.res → History/HistoryTypes.res} +3 -2
- package/src/{IndexedDBAPI → IndexedDB}/IDBDatabase.res +14 -16
- package/src/{IndexedDBAPI → IndexedDB}/IDBFactory.res +10 -6
- package/src/{IndexedDBAPI → IndexedDB}/IDBIndex.res +22 -17
- package/src/{IndexedDBAPI → IndexedDB}/IDBObjectStore.res +44 -33
- package/src/{IndexedDBAPI → IndexedDB}/IDBTransaction.res +5 -6
- package/src/{IndexedDBAPI.res → IndexedDB/IndexedDbTypes.res} +16 -17
- package/src/IntersectionObserver/IntersectionObserver.res +39 -0
- package/src/IntersectionObserver/IntersectionObserverRoot.res +21 -0
- package/src/{IntersectionObserverAPI.res → IntersectionObserver/IntersectionObserverTypes.res} +7 -9
- package/src/MediaCapabilities/MediaCapabilities.res +19 -0
- package/src/{MediaCapabilitiesAPI.res → MediaCapabilities/MediaCapabilitiesTypes.res} +3 -3
- package/src/{MediaCaptureAndStreamsAPI.res → MediaCaptureAndStreams/MediaCaptureAndStreamsTypes.res} +7 -8
- package/src/MediaCaptureAndStreams/MediaDeviceInfo.res +9 -0
- package/src/MediaCaptureAndStreams/MediaDevices.res +40 -0
- package/src/MediaCaptureAndStreams/MediaStream.res +89 -0
- package/src/MediaCaptureAndStreams/MediaStreamTrack.res +51 -0
- package/src/MediaSession/MediaMetadata.res +10 -0
- package/src/MediaSession/MediaSession.res +25 -0
- package/src/{MediaSessionAPI.res → MediaSession/MediaSessionTypes.res} +4 -2
- package/src/MutationObserver/MutationObserver.res +31 -0
- package/src/{MutationObserverAPI.res → MutationObserver/MutationObserverTypes.res} +3 -5
- package/src/Notification/Notification.res +46 -0
- package/src/{NotificationAPI.res → Notification/NotificationTypes.res} +5 -7
- package/src/Performance/Performance.res +101 -0
- package/src/{PerformanceAPI → Performance}/PerformanceEntry.res +1 -3
- package/src/Performance/PerformanceMark.res +16 -0
- package/src/{PerformanceAPI.res → Performance/PerformanceTypes.res} +9 -12
- package/src/Permissions/Permissions.res +10 -0
- package/src/{PermissionsAPI.res → Permissions/PermissionsTypes.res} +4 -6
- package/src/PictureInPicture/PictureInPicture.res +7 -0
- package/src/{PictureInPictureAPI.res → PictureInPicture/PictureInPictureTypes.res} +1 -3
- package/src/Push/ApplicationServerKey.res +2 -0
- package/src/Push/PushEvent.res +3 -0
- package/src/Push/PushManager.res +24 -0
- package/src/{PushAPI → Push}/PushMessageData.res +3 -3
- package/src/{PushAPI → Push}/PushSubscription.res +4 -5
- package/src/{PushAPI.res → Push/PushTypes.res} +6 -8
- package/src/RemotePlayback/RemotePlayback.res +25 -0
- package/src/{RemotePlaybackAPI.res → RemotePlayback/RemotePlaybackTypes.res} +4 -6
- package/src/ResizeObserver/ResizeObserver.res +30 -0
- package/src/{ResizeObserverAPI.res → ResizeObserver/ResizeObserverTypes.res} +5 -7
- package/src/{ScreenWakeLockAPI.res → ScreenWakeLock/ScreenWakeLockTypes.res} +3 -5
- package/src/ScreenWakeLock/WakeLock.res +8 -0
- package/src/ScreenWakeLock/WakeLockSentinel.res +7 -0
- package/src/ServiceWorker/Cache.res +117 -0
- package/src/{ServiceWorkerAPI → ServiceWorker}/Clients.res +14 -7
- package/src/{ServiceWorkerAPI → ServiceWorker}/NavigationPreloadManager.res +7 -6
- package/src/ServiceWorker/ServiceWorker.res +38 -0
- package/src/ServiceWorker/ServiceWorkerContainer.res +34 -0
- package/src/{ServiceWorkerAPI → ServiceWorker}/ServiceWorkerRegistration.res +8 -11
- package/src/ServiceWorker/ServiceWorkerScope.res +12 -0
- package/src/{ServiceWorkerAPI.res → ServiceWorker/ServiceWorkerTypes.res} +18 -23
- package/src/{StorageAPI → Storage}/StorageManager.res +5 -7
- package/src/{StorageAPI.res → Storage/StorageTypes.res} +1 -1
- package/src/UIEvents/CompositionEvent.res +10 -0
- package/src/{UIEventsAPI → UIEvents}/DataTransfer.res +10 -8
- package/src/{UIEventsAPI → UIEvents}/DataTransferItem.res +5 -8
- package/src/{UIEventsAPI → UIEvents}/DataTransferItemList.res +11 -7
- package/src/UIEvents/FocusEvent.res +10 -0
- package/src/UIEvents/InputEvent.res +16 -0
- package/src/UIEvents/KeyboardEvent.res +16 -0
- package/src/{UIEventsAPI → UIEvents}/MouseEvent.res +6 -5
- package/src/UIEvents/PointerEvent.res +24 -0
- package/src/{UIEventsAPI → UIEvents}/Touch.res +1 -3
- package/src/UIEvents/TouchEvent.res +10 -0
- package/src/{UIEventsAPI → UIEvents}/TouchList.res +1 -3
- package/src/UIEvents/UIEvent.res +20 -0
- package/src/{UIEventsAPI.res → UIEvents/UiEventsTypes.res} +28 -30
- package/src/UIEvents/WheelEvent.res +10 -0
- package/src/{URLAPI → URL}/URL.res +6 -5
- package/src/{URLAPI → URL}/URLSearchParams.res +20 -17
- package/src/{URLAPI.res → URL/UrlTypes.res} +5 -4
- package/src/{ViewTransitionsAPI → ViewTransitions}/ViewTransition.res +1 -3
- package/src/{ViewTransitionsAPI.res → ViewTransitions/ViewTransitionsTypes.res} +1 -1
- package/src/VisualViewport/VisualViewport.res +5 -0
- package/src/{VisualViewportAPI.res → VisualViewport/VisualViewportTypes.res} +2 -4
- package/src/WebAudio/AnalyserNode.res +38 -0
- package/src/{WebAudioAPI → WebAudio}/AudioBuffer.res +4 -6
- package/src/{WebAudioAPI → WebAudio}/AudioBufferSourceNode.res +5 -7
- package/src/WebAudio/AudioContext.res +59 -0
- package/src/WebAudio/AudioDestinationNode.res +1 -0
- package/src/{WebAudioAPI → WebAudio}/AudioNode.res +21 -12
- package/src/{WebAudioAPI → WebAudio}/AudioParam.res +23 -14
- package/src/WebAudio/AudioProcessingEvent.res +10 -0
- package/src/{WebAudioAPI → WebAudio}/AudioScheduledSourceNode.res +2 -4
- package/src/WebAudio/AudioWorkletNode.res +11 -0
- package/src/{WebAudioAPI → WebAudio}/BaseAudioContext.res +26 -25
- package/src/{WebAudioAPI → WebAudio}/BiquadFilterNode.res +6 -6
- package/src/WebAudio/ChannelMergerNode.res +10 -0
- package/src/WebAudio/ChannelSplitterNode.res +10 -0
- package/src/WebAudio/ConstantSourceNode.res +10 -0
- package/src/WebAudio/ConvolverNode.res +10 -0
- package/src/WebAudio/DelayNode.res +10 -0
- package/src/WebAudio/DynamicsCompressorNode.res +10 -0
- package/src/WebAudio/GainNode.res +10 -0
- package/src/{WebAudioAPI → WebAudio}/IIRFilterNode.res +6 -6
- package/src/WebAudio/MediaElementAudioSourceNode.res +10 -0
- package/src/WebAudio/MediaStreamAudioDestinationNode.res +10 -0
- package/src/WebAudio/MediaStreamAudioSourceNode.res +10 -0
- package/src/WebAudio/OfflineAudioCompletionEvent.res +10 -0
- package/src/WebAudio/OfflineAudioContext.res +58 -0
- package/src/WebAudio/OscillatorNode.res +17 -0
- package/src/WebAudio/PannerNode.res +10 -0
- package/src/WebAudio/PeriodicWave.res +8 -0
- package/src/WebAudio/StereoPannerNode.res +10 -0
- package/src/WebAudio/WaveShaperNode.res +10 -0
- package/src/{WebAudioAPI.res → WebAudio/WebAudioTypes.res} +55 -42
- package/src/{WebAudioAPI → WebAudio}/Worklet.res +5 -4
- package/src/{WebCryptoAPI → WebCrypto}/Crypto.res +2 -4
- package/src/WebCrypto/SubtleCrypto.res +173 -0
- package/src/{WebCryptoAPI.res → WebCrypto/WebCryptoTypes.res} +3 -5
- package/src/WebLocks/LockManager.res +26 -0
- package/src/{WebLocksAPI.res → WebLocks/WebLocksTypes.res} +2 -4
- package/src/WebMIDI/WebMIDI.res +7 -0
- package/src/{WebMIDIAPI.res → WebMIDI/WebMidiTypes.res} +1 -3
- package/src/WebSockets/CloseEvent.res +10 -0
- package/src/{WebSocketsAPI → WebSockets}/MessageEvent.res +14 -9
- package/src/WebSockets/WebSocket.res +71 -0
- package/src/{WebSocketsAPI.res → WebSockets/WebSocketsTypes.res} +12 -15
- package/src/{WebSpeechAPI → WebSpeech}/SpeechSynthesis.res +8 -8
- package/src/WebSpeech/SpeechSynthesisUtterance.res +8 -0
- package/src/{WebSpeechAPI.res → WebSpeech/WebSpeechTypes.res} +4 -5
- package/src/{WebStorageAPI → WebStorage}/Storage.res +8 -10
- package/src/WebStorage/StorageEvent.res +10 -0
- package/src/{WebStorageAPI.res → WebStorage/WebStorageTypes.res} +9 -11
- package/src/{WebVTTAPI → WebVTT}/TextTrack.res +3 -5
- package/src/{WebVTTAPI → WebVTT}/TextTrackCueList.res +2 -3
- package/src/{WebVTTAPI.res → WebVTT/WebVttTypes.res} +5 -5
- package/src/WebWorkers/CacheStorage.res +43 -0
- package/src/{WebWorkersAPI → WebWorkers}/SharedWorker.res +13 -12
- package/src/{WebWorkersAPI/SharedWorkerGlobalScope.res → WebWorkers/SharedWorkerScope.res} +6 -4
- package/src/{WebWorkersAPI.res → WebWorkers/WebWorkersTypes.res} +7 -10
- package/src/{WebWorkersAPI/WorkerGlobalScope.res → WebWorkers/Worker.res} +8 -8
- package/src/CSSFontLoadingAPI/FontFace.res +0 -34
- package/src/CSSFontLoadingAPI/FontFaceSet.res +0 -33
- package/src/CanvasAPI/FillStyle.res +0 -24
- package/src/ClipboardAPI/Clipboard.res +0 -27
- package/src/CredentialManagementAPI/CredentialsContainer.res +0 -29
- package/src/DOMAPI/CSSStyleSheet.res +0 -32
- package/src/DOMAPI/CaretPosition.res +0 -4
- package/src/DOMAPI/Comment.res +0 -9
- package/src/DOMAPI/DOMMatrix.res +0 -169
- package/src/DOMAPI/DOMMatrixReadOnly.res +0 -103
- package/src/DOMAPI/DOMPoint.res +0 -29
- package/src/DOMAPI/DOMRectList.res +0 -4
- package/src/DOMAPI/DOMRectReadOnly.res +0 -17
- package/src/DOMAPI/DocumentTimeline.res +0 -9
- package/src/DOMAPI/HTMLAnchorElement.res +0 -3
- package/src/DOMAPI/HTMLAreaElement.res +0 -3
- package/src/DOMAPI/HTMLAudioElement.res +0 -3
- package/src/DOMAPI/HTMLBRElement.res +0 -3
- package/src/DOMAPI/HTMLBaseElement.res +0 -3
- package/src/DOMAPI/HTMLBodyElement.res +0 -3
- package/src/DOMAPI/HTMLDListElement.res +0 -3
- package/src/DOMAPI/HTMLDataElement.res +0 -3
- package/src/DOMAPI/HTMLDataListElement.res +0 -3
- package/src/DOMAPI/HTMLDivElement.res +0 -3
- package/src/DOMAPI/HTMLEmbedElement.res +0 -6
- package/src/DOMAPI/HTMLFormControlsCollection.res +0 -16
- package/src/DOMAPI/HTMLFrameSetElement.res +0 -3
- package/src/DOMAPI/HTMLHRElement.res +0 -3
- package/src/DOMAPI/HTMLHeadElement.res +0 -3
- package/src/DOMAPI/HTMLHeadingElement.res +0 -3
- package/src/DOMAPI/HTMLHtmlElement.res +0 -3
- package/src/DOMAPI/HTMLIFrameElement.res +0 -6
- package/src/DOMAPI/HTMLImageElement.res +0 -9
- package/src/DOMAPI/HTMLLIElement.res +0 -3
- package/src/DOMAPI/HTMLLabelElement.res +0 -3
- package/src/DOMAPI/HTMLLegendElement.res +0 -3
- package/src/DOMAPI/HTMLLinkElement.res +0 -3
- package/src/DOMAPI/HTMLMapElement.res +0 -3
- package/src/DOMAPI/HTMLMenuElement.res +0 -3
- package/src/DOMAPI/HTMLMetaElement.res +0 -3
- package/src/DOMAPI/HTMLMeterElement.res +0 -3
- package/src/DOMAPI/HTMLModElement.res +0 -3
- package/src/DOMAPI/HTMLOListElement.res +0 -3
- package/src/DOMAPI/HTMLOptGroupElement.res +0 -3
- package/src/DOMAPI/HTMLOptionElement.res +0 -3
- package/src/DOMAPI/HTMLParagraphElement.res +0 -3
- package/src/DOMAPI/HTMLPictureElement.res +0 -3
- package/src/DOMAPI/HTMLPreElement.res +0 -3
- package/src/DOMAPI/HTMLProgressElement.res +0 -3
- package/src/DOMAPI/HTMLQuoteElement.res +0 -3
- package/src/DOMAPI/HTMLSlotElement.res +0 -29
- package/src/DOMAPI/HTMLSourceElement.res +0 -3
- package/src/DOMAPI/HTMLSpanElement.res +0 -3
- package/src/DOMAPI/HTMLStyleElement.res +0 -3
- package/src/DOMAPI/HTMLTableCaptionElement.res +0 -3
- package/src/DOMAPI/HTMLTableCellElement.res +0 -3
- package/src/DOMAPI/HTMLTemplateElement.res +0 -3
- package/src/DOMAPI/HTMLTimeElement.res +0 -3
- package/src/DOMAPI/HTMLTitleElement.res +0 -3
- package/src/DOMAPI/HTMLTrackElement.res +0 -3
- package/src/DOMAPI/HTMLUListElement.res +0 -3
- package/src/DOMAPI/HTMLVideoElement.res +0 -31
- package/src/DOMAPI/MediaQueryList.res +0 -3
- package/src/DOMAPI/Navigator.res +0 -115
- package/src/DOMAPI/NodeFilter.res +0 -4
- package/src/DOMAPI/SVGGraphicsElement.res +0 -17
- package/src/DOMAPI/ScreenOrientation.res +0 -9
- package/src/DOMAPI/ShadowRoot.res +0 -21
- package/src/DOMAPI/StylePropertyMap.res +0 -50
- package/src/DOMAPI/TextTrackList.res +0 -10
- package/src/DOMAPI/VideoFrame.res +0 -111
- package/src/DOMAPI/Window.res +0 -517
- package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +0 -13
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +0 -27
- package/src/FetchAPI/FormDataEntryValue.res +0 -22
- package/src/FileAPI/FileSystemDirectoryHandle.res +0 -45
- package/src/FileAPI/FileSystemFileHandle.res +0 -23
- package/src/FileAPI/FileSystemHandle.res +0 -7
- package/src/FileAPI/FileSystemWritableFileStream.res +0 -62
- package/src/FileAPI/ReadableStream.res +0 -60
- package/src/FileAPI/WritableStream.res +0 -28
- package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryEntry.res +0 -42
- package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryReader.res +0 -11
- package/src/FileAndDirectoryEntriesAPI/FileSystemEntry.res +0 -11
- package/src/GamepadAPI/GamepadHapticActuator.res +0 -17
- package/src/GeolocationAPI/Geolocation.res +0 -29
- package/src/IntersectionObserverAPI/IntersectionObserver.res +0 -35
- package/src/IntersectionObserverAPI/IntersectionObserverRoot.res +0 -22
- package/src/MediaCapabilitiesAPI/MediaCapabilities.res +0 -19
- package/src/MediaCaptureAndStreamsAPI/MediaDeviceInfo.res +0 -7
- package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +0 -34
- package/src/MediaCaptureAndStreamsAPI/MediaStream.res +0 -63
- package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +0 -42
- package/src/MediaSessionAPI/MediaMetadata.res +0 -7
- package/src/MediaSessionAPI/MediaSession.res +0 -17
- package/src/MutationObserverAPI/MutationObserver.res +0 -27
- package/src/NotificationAPI/Notification.res +0 -29
- package/src/PerformanceAPI/Performance.res +0 -90
- package/src/PerformanceAPI/PerformanceMark.res +0 -15
- package/src/PermissionsAPI/Permissions.res +0 -7
- package/src/Prelude/DOMException.res +0 -7
- package/src/Prelude.res +0 -37
- package/src/PushAPI/ApplicationServerKey.res +0 -4
- package/src/PushAPI/PushEvent.res +0 -3
- package/src/PushAPI/PushManager.res +0 -25
- package/src/RemotePlaybackAPI/RemotePlayback.res +0 -23
- package/src/ResizeObserverAPI/ResizeObserver.res +0 -27
- package/src/ScreenWakeLockAPI/WakeLock.res +0 -7
- package/src/ScreenWakeLockAPI/WakeLockSentinel.res +0 -9
- package/src/ServiceWorkerAPI/Cache.res +0 -100
- package/src/ServiceWorkerAPI/ServiceWorker.res +0 -21
- package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +0 -35
- package/src/ServiceWorkerAPI/ServiceWorkerGlobalScope.res +0 -10
- package/src/UIEventsAPI/CompositionEvent.res +0 -10
- package/src/UIEventsAPI/FocusEvent.res +0 -9
- package/src/UIEventsAPI/InputEvent.res +0 -16
- package/src/UIEventsAPI/KeyboardEvent.res +0 -16
- package/src/UIEventsAPI/PointerEvent.res +0 -21
- package/src/UIEventsAPI/TouchEvent.res +0 -9
- package/src/UIEventsAPI/UIEvent.res +0 -19
- package/src/UIEventsAPI/WheelEvent.res +0 -9
- package/src/WebAudioAPI/AnalyserNode.res +0 -34
- package/src/WebAudioAPI/AudioContext.res +0 -56
- package/src/WebAudioAPI/AudioDestinationNode.res +0 -3
- package/src/WebAudioAPI/AudioProcessingEvent.res +0 -10
- package/src/WebAudioAPI/AudioWorkletNode.res +0 -13
- package/src/WebAudioAPI/ChannelMergerNode.res +0 -10
- package/src/WebAudioAPI/ChannelSplitterNode.res +0 -12
- package/src/WebAudioAPI/ConstantSourceNode.res +0 -12
- package/src/WebAudioAPI/ConvolverNode.res +0 -10
- package/src/WebAudioAPI/DelayNode.res +0 -9
- package/src/WebAudioAPI/DynamicsCompressorNode.res +0 -12
- package/src/WebAudioAPI/GainNode.res +0 -9
- package/src/WebAudioAPI/MediaElementAudioSourceNode.res +0 -12
- package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +0 -12
- package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +0 -12
- package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +0 -12
- package/src/WebAudioAPI/OfflineAudioContext.res +0 -34
- package/src/WebAudioAPI/OscillatorNode.res +0 -16
- package/src/WebAudioAPI/PannerNode.res +0 -9
- package/src/WebAudioAPI/PeriodicWave.res +0 -8
- package/src/WebAudioAPI/StereoPannerNode.res +0 -10
- package/src/WebAudioAPI/WaveShaperNode.res +0 -10
- package/src/WebCryptoAPI/SubtleCrypto.res +0 -173
- package/src/WebLocksAPI/LockManager.res +0 -25
- package/src/WebSocketsAPI/CloseEvent.res +0 -9
- package/src/WebSocketsAPI/WebSocket.res +0 -51
- package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +0 -9
- package/src/WebStorageAPI/StorageEvent.res +0 -9
- package/src/WebWorkersAPI/CacheStorage.res +0 -46
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
open IndexedDBAPI
|
|
2
|
-
open Prelude
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
Adds or updates a record in store with the given value and key.
|
|
6
3
|
|
|
@@ -12,8 +9,11 @@ If successful, request's result will be the record's key.
|
|
|
12
9
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/put)
|
|
13
10
|
*/
|
|
14
11
|
@send
|
|
15
|
-
external put: (
|
|
16
|
-
|
|
12
|
+
external put: (
|
|
13
|
+
IndexedDbTypes.idbObjectStore,
|
|
14
|
+
~value: JSON.t,
|
|
15
|
+
~key: IndexedDbTypes.idbValidKey=?,
|
|
16
|
+
) => IndexedDbTypes.idbRequest<IndexedDbTypes.idbValidKey> = "put"
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
Adds or updates a record in store with the given value and key.
|
|
@@ -26,8 +26,11 @@ If successful, request's result will be the record's key.
|
|
|
26
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/add)
|
|
27
27
|
*/
|
|
28
28
|
@send
|
|
29
|
-
external add: (
|
|
30
|
-
|
|
29
|
+
external add: (
|
|
30
|
+
IndexedDbTypes.idbObjectStore,
|
|
31
|
+
~value: JSON.t,
|
|
32
|
+
~key: IndexedDbTypes.idbValidKey=?,
|
|
33
|
+
) => IndexedDbTypes.idbRequest<IndexedDbTypes.idbValidKey> = "add"
|
|
31
34
|
|
|
32
35
|
/**
|
|
33
36
|
Deletes records in store with the given key or in the given key range in query.
|
|
@@ -36,7 +39,8 @@ If successful, request's result will be undefined.
|
|
|
36
39
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/delete)
|
|
37
40
|
*/
|
|
38
41
|
@send
|
|
39
|
-
external delete: (idbObjectStore,
|
|
42
|
+
external delete: (IndexedDbTypes.idbObjectStore, unknown) => IndexedDbTypes.idbRequest<unit> =
|
|
43
|
+
"delete"
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
Deletes all records in store.
|
|
@@ -45,7 +49,7 @@ If successful, request's result will be undefined.
|
|
|
45
49
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/clear)
|
|
46
50
|
*/
|
|
47
51
|
@send
|
|
48
|
-
external clear: idbObjectStore => idbRequest<unit> = "clear"
|
|
52
|
+
external clear: IndexedDbTypes.idbObjectStore => IndexedDbTypes.idbRequest<unit> = "clear"
|
|
49
53
|
|
|
50
54
|
/**
|
|
51
55
|
Retrieves the value of the first record matching the given key or key range in query.
|
|
@@ -54,7 +58,7 @@ If successful, request's result will be the value, or undefined if there was no
|
|
|
54
58
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/get)
|
|
55
59
|
*/
|
|
56
60
|
@send
|
|
57
|
-
external get: (idbObjectStore,
|
|
61
|
+
external get: (IndexedDbTypes.idbObjectStore, unknown) => IndexedDbTypes.idbRequest<JSON.t> = "get"
|
|
58
62
|
|
|
59
63
|
/**
|
|
60
64
|
Retrieves the key of the first record matching the given key or key range in query.
|
|
@@ -63,7 +67,8 @@ If successful, request's result will be the key, or undefined if there was no ma
|
|
|
63
67
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getKey)
|
|
64
68
|
*/
|
|
65
69
|
@send
|
|
66
|
-
external getKey: (idbObjectStore,
|
|
70
|
+
external getKey: (IndexedDbTypes.idbObjectStore, unknown) => IndexedDbTypes.idbRequest<unknown> =
|
|
71
|
+
"getKey"
|
|
67
72
|
|
|
68
73
|
/**
|
|
69
74
|
Retrieves the values of the records matching the given key or key range in query (up to count if given).
|
|
@@ -72,8 +77,11 @@ If successful, request's result will be an Array of the values.
|
|
|
72
77
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAll)
|
|
73
78
|
*/
|
|
74
79
|
@send
|
|
75
|
-
external getAll: (
|
|
76
|
-
|
|
80
|
+
external getAll: (
|
|
81
|
+
IndexedDbTypes.idbObjectStore,
|
|
82
|
+
~query: unknown=?,
|
|
83
|
+
~count: int=?,
|
|
84
|
+
) => IndexedDbTypes.idbRequest<array<JSON.t>> = "getAll"
|
|
77
85
|
|
|
78
86
|
/**
|
|
79
87
|
Retrieves the keys of records matching the given key or key range in query (up to count if given).
|
|
@@ -83,10 +91,10 @@ If successful, request's result will be an Array of the keys.
|
|
|
83
91
|
*/
|
|
84
92
|
@send
|
|
85
93
|
external getAllKeys: (
|
|
86
|
-
idbObjectStore,
|
|
87
|
-
~query:
|
|
94
|
+
IndexedDbTypes.idbObjectStore,
|
|
95
|
+
~query: unknown=?,
|
|
88
96
|
~count: int=?,
|
|
89
|
-
) => idbRequest<array<idbValidKey>> = "getAllKeys"
|
|
97
|
+
) => IndexedDbTypes.idbRequest<array<IndexedDbTypes.idbValidKey>> = "getAllKeys"
|
|
90
98
|
|
|
91
99
|
/**
|
|
92
100
|
Retrieves the number of records matching the given key or key range in query.
|
|
@@ -95,7 +103,10 @@ If successful, request's result will be the count.
|
|
|
95
103
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/count)
|
|
96
104
|
*/
|
|
97
105
|
@send
|
|
98
|
-
external count: (
|
|
106
|
+
external count: (
|
|
107
|
+
IndexedDbTypes.idbObjectStore,
|
|
108
|
+
~query: unknown=?,
|
|
109
|
+
) => IndexedDbTypes.idbRequest<int> = "count"
|
|
99
110
|
|
|
100
111
|
/**
|
|
101
112
|
Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
|
|
@@ -105,10 +116,10 @@ If successful, request's result will be an IDBCursorWithValue pointing at the fi
|
|
|
105
116
|
*/
|
|
106
117
|
@send
|
|
107
118
|
external openCursor: (
|
|
108
|
-
idbObjectStore,
|
|
109
|
-
~query:
|
|
110
|
-
~direction: idbCursorDirection=?,
|
|
111
|
-
) => idbRequest<
|
|
119
|
+
IndexedDbTypes.idbObjectStore,
|
|
120
|
+
~query: unknown=?,
|
|
121
|
+
~direction: IndexedDbTypes.idbCursorDirection=?,
|
|
122
|
+
) => IndexedDbTypes.idbRequest<unknown> = "openCursor"
|
|
112
123
|
|
|
113
124
|
/**
|
|
114
125
|
Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
|
|
@@ -118,16 +129,16 @@ If successful, request's result will be an IDBCursor pointing at the first match
|
|
|
118
129
|
*/
|
|
119
130
|
@send
|
|
120
131
|
external openKeyCursor: (
|
|
121
|
-
idbObjectStore,
|
|
122
|
-
~query:
|
|
123
|
-
~direction: idbCursorDirection=?,
|
|
124
|
-
) => idbRequest<
|
|
132
|
+
IndexedDbTypes.idbObjectStore,
|
|
133
|
+
~query: unknown=?,
|
|
134
|
+
~direction: IndexedDbTypes.idbCursorDirection=?,
|
|
135
|
+
) => IndexedDbTypes.idbRequest<unknown> = "openKeyCursor"
|
|
125
136
|
|
|
126
137
|
/**
|
|
127
138
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/index)
|
|
128
139
|
*/
|
|
129
140
|
@send
|
|
130
|
-
external index: (idbObjectStore, string) => idbIndex = "index"
|
|
141
|
+
external index: (IndexedDbTypes.idbObjectStore, string) => IndexedDbTypes.idbIndex = "index"
|
|
131
142
|
|
|
132
143
|
/**
|
|
133
144
|
Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
|
|
@@ -137,11 +148,11 @@ Throws an "InvalidStateError" DOMException if not called within an upgrade trans
|
|
|
137
148
|
*/
|
|
138
149
|
@send
|
|
139
150
|
external createIndex: (
|
|
140
|
-
idbObjectStore,
|
|
151
|
+
IndexedDbTypes.idbObjectStore,
|
|
141
152
|
~name: string,
|
|
142
153
|
~keyPath: string,
|
|
143
|
-
~options: idbIndexParameters=?,
|
|
144
|
-
) => idbIndex = "createIndex"
|
|
154
|
+
~options: IndexedDbTypes.idbIndexParameters=?,
|
|
155
|
+
) => IndexedDbTypes.idbIndex = "createIndex"
|
|
145
156
|
|
|
146
157
|
/**
|
|
147
158
|
Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
|
|
@@ -151,11 +162,11 @@ Throws an "InvalidStateError" DOMException if not called within an upgrade trans
|
|
|
151
162
|
*/
|
|
152
163
|
@send
|
|
153
164
|
external createIndex2: (
|
|
154
|
-
idbObjectStore,
|
|
165
|
+
IndexedDbTypes.idbObjectStore,
|
|
155
166
|
~name: string,
|
|
156
167
|
~keyPath: array<string>,
|
|
157
|
-
~options: idbIndexParameters=?,
|
|
158
|
-
) => idbIndex = "createIndex"
|
|
168
|
+
~options: IndexedDbTypes.idbIndexParameters=?,
|
|
169
|
+
) => IndexedDbTypes.idbIndex = "createIndex"
|
|
159
170
|
|
|
160
171
|
/**
|
|
161
172
|
Deletes the index in store with the given name.
|
|
@@ -164,4 +175,4 @@ Throws an "InvalidStateError" DOMException if not called within an upgrade trans
|
|
|
164
175
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/deleteIndex)
|
|
165
176
|
*/
|
|
166
177
|
@send
|
|
167
|
-
external deleteIndex: (idbObjectStore, string) => unit = "deleteIndex"
|
|
178
|
+
external deleteIndex: (IndexedDbTypes.idbObjectStore, string) => unit = "deleteIndex"
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
include EventTarget.Impl({type t = idbTransaction})
|
|
1
|
+
include EventTarget.Impl({type t = IndexedDbTypes.idbTransaction})
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
Returns an IDBObjectStore in the transaction's scope.
|
|
7
5
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStore)
|
|
8
6
|
*/
|
|
9
7
|
@send
|
|
10
|
-
external objectStore: (idbTransaction, string) => idbObjectStore =
|
|
8
|
+
external objectStore: (IndexedDbTypes.idbTransaction, string) => IndexedDbTypes.idbObjectStore =
|
|
9
|
+
"objectStore"
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction/commit)
|
|
14
13
|
*/
|
|
15
14
|
@send
|
|
16
|
-
external commit: idbTransaction => unit = "commit"
|
|
15
|
+
external commit: IndexedDbTypes.idbTransaction => unit = "commit"
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
|
|
20
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort)
|
|
21
20
|
*/
|
|
22
21
|
@send
|
|
23
|
-
external abort: idbTransaction => unit = "abort"
|
|
22
|
+
external abort: IndexedDbTypes.idbTransaction => unit = "abort"
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
@@warning("-30")
|
|
2
2
|
|
|
3
|
-
open Prelude
|
|
4
|
-
open EventAPI
|
|
5
|
-
|
|
6
3
|
type idbTransactionMode =
|
|
7
4
|
| @as("readonly") Readonly
|
|
8
5
|
| @as("readwrite") Readwrite
|
|
@@ -28,15 +25,15 @@ In the following code snippet, we make a request to open a database, and include
|
|
|
28
25
|
[See IDBFactory on MDN](https://developer.mozilla.org/docs/Web/API/IDBFactory)
|
|
29
26
|
*/
|
|
30
27
|
@editor.completeFrom(IDBFactory)
|
|
31
|
-
type idbFactory = {}
|
|
28
|
+
type idbFactory = private {}
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
|
-
This
|
|
31
|
+
This WebApiIndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database.
|
|
35
32
|
[See IDBDatabase on MDN](https://developer.mozilla.org/docs/Web/API/IDBDatabase)
|
|
36
33
|
*/
|
|
37
34
|
@editor.completeFrom(IDBDatabase)
|
|
38
|
-
type idbDatabase = {
|
|
39
|
-
...eventTarget,
|
|
35
|
+
type idbDatabase = private {
|
|
36
|
+
...EventTypes.eventTarget,
|
|
40
37
|
/**
|
|
41
38
|
Returns the name of the database.
|
|
42
39
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBDatabase/name)
|
|
@@ -51,20 +48,20 @@ type idbDatabase = {
|
|
|
51
48
|
Returns a list of the names of object stores in the database.
|
|
52
49
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames)
|
|
53
50
|
*/
|
|
54
|
-
objectStoreNames: domStringList,
|
|
51
|
+
objectStoreNames: DOM.domStringList,
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
/**
|
|
58
55
|
[See IDBTransaction on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction)
|
|
59
56
|
*/
|
|
60
57
|
@editor.completeFrom(IDBTransaction)
|
|
61
|
-
type idbTransaction = {
|
|
62
|
-
...eventTarget,
|
|
58
|
+
type idbTransaction = private {
|
|
59
|
+
...EventTypes.eventTarget,
|
|
63
60
|
/**
|
|
64
61
|
Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database.
|
|
65
62
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames)
|
|
66
63
|
*/
|
|
67
|
-
objectStoreNames: domStringList,
|
|
64
|
+
objectStoreNames: DOM.domStringList,
|
|
68
65
|
/**
|
|
69
66
|
Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
|
|
70
67
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction/mode)
|
|
@@ -83,7 +80,7 @@ type idbTransaction = {
|
|
|
83
80
|
If the transaction was aborted, returns the error (a DOMException) providing the reason.
|
|
84
81
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBTransaction/error)
|
|
85
82
|
*/
|
|
86
|
-
error: Null.t<domException>,
|
|
83
|
+
error: Null.t<DOM.domException>,
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
/**
|
|
@@ -91,7 +88,7 @@ The request object does not initially contain any information about the result o
|
|
|
91
88
|
[See IDBRequest on MDN](https://developer.mozilla.org/docs/Web/API/IDBRequest)
|
|
92
89
|
*/
|
|
93
90
|
type idbRequest<'t> = {
|
|
94
|
-
...eventTarget,
|
|
91
|
+
...EventTypes.eventTarget,
|
|
95
92
|
/**
|
|
96
93
|
When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.
|
|
97
94
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBRequest/result)
|
|
@@ -101,7 +98,7 @@ type idbRequest<'t> = {
|
|
|
101
98
|
When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending.
|
|
102
99
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBRequest/error)
|
|
103
100
|
*/
|
|
104
|
-
error: Null.t<domException>,
|
|
101
|
+
error: Null.t<DOM.domException>,
|
|
105
102
|
/**
|
|
106
103
|
Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.
|
|
107
104
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBRequest/source)
|
|
@@ -130,6 +127,7 @@ type idbOpenDBRequest = {
|
|
|
130
127
|
/**
|
|
131
128
|
This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.)
|
|
132
129
|
[See IDBObjectStore on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore)
|
|
130
|
+
TODO: mark as private once mutating fields of private records is allowed
|
|
133
131
|
*/
|
|
134
132
|
@editor.completeFrom(IDBObjectStore)
|
|
135
133
|
type idbObjectStore = {
|
|
@@ -147,7 +145,7 @@ type idbObjectStore = {
|
|
|
147
145
|
Returns a list of the names of indexes in the store.
|
|
148
146
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/indexNames)
|
|
149
147
|
*/
|
|
150
|
-
indexNames: domStringList,
|
|
148
|
+
indexNames: DOM.domStringList,
|
|
151
149
|
/**
|
|
152
150
|
Returns the associated transaction.
|
|
153
151
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/transaction)
|
|
@@ -161,8 +159,9 @@ type idbObjectStore = {
|
|
|
161
159
|
}
|
|
162
160
|
|
|
163
161
|
/**
|
|
164
|
-
IDBIndex interface of the
|
|
162
|
+
IDBIndex interface of the WebApiIndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data.
|
|
165
163
|
[See IDBIndex on MDN](https://developer.mozilla.org/docs/Web/API/IDBIndex)
|
|
164
|
+
TODO: mark as private once mutating fields of private records is allowed
|
|
166
165
|
*/
|
|
167
166
|
@editor.completeFrom(IDBIndex)
|
|
168
167
|
type idbIndex = {
|
|
@@ -190,7 +189,7 @@ type idbIndex = {
|
|
|
190
189
|
unique: bool,
|
|
191
190
|
}
|
|
192
191
|
|
|
193
|
-
type idbValidKey =
|
|
192
|
+
type idbValidKey = unknown
|
|
194
193
|
|
|
195
194
|
type idbDatabaseInfo = {
|
|
196
195
|
mutable name?: string,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver)
|
|
3
|
+
*/
|
|
4
|
+
@new
|
|
5
|
+
external make: (
|
|
6
|
+
~callback: IntersectionObserverTypes.intersectionObserverCallback,
|
|
7
|
+
~options: IntersectionObserverTypes.intersectionObserverInit=?,
|
|
8
|
+
) => IntersectionObserverTypes.intersectionObserver = "IntersectionObserver"
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/observe)
|
|
12
|
+
*/
|
|
13
|
+
@send
|
|
14
|
+
external observe: (IntersectionObserverTypes.intersectionObserver, DomTypes.element) => unit =
|
|
15
|
+
"observe"
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/unobserve)
|
|
19
|
+
*/
|
|
20
|
+
@send
|
|
21
|
+
external unobserve: (IntersectionObserverTypes.intersectionObserver, DomTypes.element) => unit =
|
|
22
|
+
"unobserve"
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/disconnect)
|
|
26
|
+
*/
|
|
27
|
+
@send
|
|
28
|
+
external disconnect: IntersectionObserverTypes.intersectionObserver => unit = "disconnect"
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/takeRecords)
|
|
32
|
+
*/
|
|
33
|
+
@send
|
|
34
|
+
external takeRecords: IntersectionObserverTypes.intersectionObserver => array<
|
|
35
|
+
IntersectionObserverTypes.intersectionObserverEntry,
|
|
36
|
+
> = "takeRecords"
|
|
37
|
+
|
|
38
|
+
module IntersectionObserverRoot = IntersectionObserverRoot
|
|
39
|
+
module Types = IntersectionObserverTypes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
external fromDocument: DomTypes.document => IntersectionObserverTypes.root = "%identity"
|
|
2
|
+
external fromElement: DomTypes.element => IntersectionObserverTypes.root = "%identity"
|
|
3
|
+
external fromNull: IntersectionObserverTypes.root = "null"
|
|
4
|
+
|
|
5
|
+
external toElement: IntersectionObserverTypes.root => DomTypes.element = "%identity"
|
|
6
|
+
external toDocument: IntersectionObserverTypes.root => DomTypes.document = "%identity"
|
|
7
|
+
|
|
8
|
+
type decoded =
|
|
9
|
+
| Element(DomTypes.element)
|
|
10
|
+
| Document(DomTypes.document)
|
|
11
|
+
| Null
|
|
12
|
+
|
|
13
|
+
let decode = (t: IntersectionObserverTypes.root): decoded => {
|
|
14
|
+
if Element.isInstanceOf(t) {
|
|
15
|
+
Element(t->toElement)
|
|
16
|
+
} else if Document.isInstanceOf(t) {
|
|
17
|
+
Document(t->toDocument)
|
|
18
|
+
} else {
|
|
19
|
+
Null
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/{IntersectionObserverAPI.res → IntersectionObserver/IntersectionObserverTypes.res}
RENAMED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
@@warning("-30")
|
|
2
2
|
|
|
3
|
-
open DOMAPI
|
|
4
|
-
|
|
5
3
|
@editor.completeFrom(IntersectionObserverRoot)
|
|
6
4
|
type root
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.
|
|
10
|
-
[See
|
|
8
|
+
[See WebApiIntersectionObserver on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver)
|
|
11
9
|
*/
|
|
12
|
-
@editor.completeFrom(
|
|
13
|
-
type intersectionObserver = {
|
|
10
|
+
@editor.completeFrom(WebApiIntersectionObserver)
|
|
11
|
+
type intersectionObserver = private {
|
|
14
12
|
/**
|
|
15
13
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/root)
|
|
16
14
|
*/
|
|
@@ -37,15 +35,15 @@ type intersectionObserverEntry = {
|
|
|
37
35
|
/**
|
|
38
36
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/rootBounds)
|
|
39
37
|
*/
|
|
40
|
-
rootBounds: Null.t<domRectReadOnly>,
|
|
38
|
+
rootBounds: Null.t<DomTypes.domRectReadOnly>,
|
|
41
39
|
/**
|
|
42
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/boundingClientRect)
|
|
43
41
|
*/
|
|
44
|
-
boundingClientRect: domRectReadOnly,
|
|
42
|
+
boundingClientRect: DomTypes.domRectReadOnly,
|
|
45
43
|
/**
|
|
46
44
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/intersectionRect)
|
|
47
45
|
*/
|
|
48
|
-
intersectionRect: domRectReadOnly,
|
|
46
|
+
intersectionRect: DomTypes.domRectReadOnly,
|
|
49
47
|
/**
|
|
50
48
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/isIntersecting)
|
|
51
49
|
*/
|
|
@@ -57,7 +55,7 @@ type intersectionObserverEntry = {
|
|
|
57
55
|
/**
|
|
58
56
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/target)
|
|
59
57
|
*/
|
|
60
|
-
target: element,
|
|
58
|
+
target: DomTypes.element,
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
type intersectionObserverInit = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo)
|
|
3
|
+
*/
|
|
4
|
+
@send
|
|
5
|
+
external decodingInfo: (
|
|
6
|
+
MediaCapabilitiesTypes.mediaCapabilities,
|
|
7
|
+
MediaCapabilitiesTypes.mediaDecodingConfiguration,
|
|
8
|
+
) => promise<MediaCapabilitiesTypes.mediaCapabilitiesDecodingInfo> = "decodingInfo"
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/encodingInfo)
|
|
12
|
+
*/
|
|
13
|
+
@send
|
|
14
|
+
external encodingInfo: (
|
|
15
|
+
MediaCapabilitiesTypes.mediaCapabilities,
|
|
16
|
+
MediaCapabilitiesTypes.mediaEncodingConfiguration,
|
|
17
|
+
) => promise<MediaCapabilitiesTypes.mediaCapabilitiesEncodingInfo> = "encodingInfo"
|
|
18
|
+
|
|
19
|
+
module Types = MediaCapabilitiesTypes
|
|
@@ -24,10 +24,10 @@ type mediaEncodingType =
|
|
|
24
24
|
| @as("webrtc") Webrtc
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
[See
|
|
27
|
+
[See WebApiMediaCapabilities on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities)
|
|
28
28
|
*/
|
|
29
|
-
@editor.completeFrom(
|
|
30
|
-
type mediaCapabilities = {}
|
|
29
|
+
@editor.completeFrom(WebApiMediaCapabilities)
|
|
30
|
+
type mediaCapabilities = private {}
|
|
31
31
|
|
|
32
32
|
type audioConfiguration = {
|
|
33
33
|
mutable contentType: string,
|
package/src/{MediaCaptureAndStreamsAPI.res → MediaCaptureAndStreams/MediaCaptureAndStreamsTypes.res}
RENAMED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
@@warning("-30")
|
|
2
2
|
|
|
3
|
-
open EventAPI
|
|
4
|
-
|
|
5
3
|
type mediaDeviceKind =
|
|
6
4
|
| @as("audioinput") Audioinput
|
|
7
5
|
| @as("audiooutput") Audiooutput
|
|
@@ -16,8 +14,8 @@ Provides access to connected media input devices like cameras and microphones, a
|
|
|
16
14
|
[See MediaDevices on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices)
|
|
17
15
|
*/
|
|
18
16
|
@editor.completeFrom(MediaDevices)
|
|
19
|
-
type mediaDevices = {
|
|
20
|
-
...eventTarget,
|
|
17
|
+
type mediaDevices = private {
|
|
18
|
+
...EventTypes.eventTarget,
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
/**
|
|
@@ -25,7 +23,7 @@ The MediaDevicesInfo interface contains information that describes a single medi
|
|
|
25
23
|
[See MediaDeviceInfo on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo)
|
|
26
24
|
*/
|
|
27
25
|
@editor.completeFrom(MediaDeviceInfo)
|
|
28
|
-
type mediaDeviceInfo = {
|
|
26
|
+
type mediaDeviceInfo = private {
|
|
29
27
|
/**
|
|
30
28
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/deviceId)
|
|
31
29
|
*/
|
|
@@ -49,8 +47,8 @@ A stream of media content. A stream consists of several tracks such as video or
|
|
|
49
47
|
[See MediaStream on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
50
48
|
*/
|
|
51
49
|
@editor.completeFrom(MediaStream)
|
|
52
|
-
type mediaStream = {
|
|
53
|
-
...eventTarget,
|
|
50
|
+
type mediaStream = private {
|
|
51
|
+
...EventTypes.eventTarget,
|
|
54
52
|
/**
|
|
55
53
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/id)
|
|
56
54
|
*/
|
|
@@ -64,10 +62,11 @@ type mediaStream = {
|
|
|
64
62
|
/**
|
|
65
63
|
A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.
|
|
66
64
|
[See MediaStreamTrack on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack)
|
|
65
|
+
TODO: mark as private once mutating fields of private records is allowed
|
|
67
66
|
*/
|
|
68
67
|
@editor.completeFrom(MediaStreamTrack)
|
|
69
68
|
type mediaStreamTrack = {
|
|
70
|
-
...eventTarget,
|
|
69
|
+
...EventTypes.eventTarget,
|
|
71
70
|
/**
|
|
72
71
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/kind)
|
|
73
72
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type t = MediaCaptureAndStreamsTypes.mediaDeviceInfo = private {
|
|
2
|
+
...MediaCaptureAndStreamsTypes.mediaDeviceInfo,
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/toJSON)
|
|
7
|
+
*/
|
|
8
|
+
@send
|
|
9
|
+
external toJSON: t => Dict.t<string> = "toJSON"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type t = MediaCaptureAndStreamsTypes.mediaDevices = private {
|
|
2
|
+
...MediaCaptureAndStreamsTypes.mediaDevices,
|
|
3
|
+
}
|
|
4
|
+
type mediaTrackSupportedConstraints = MediaCaptureAndStreamsTypes.mediaTrackSupportedConstraints = {
|
|
5
|
+
...MediaCaptureAndStreamsTypes.mediaTrackSupportedConstraints,
|
|
6
|
+
}
|
|
7
|
+
type mediaStreamConstraints = MediaCaptureAndStreamsTypes.mediaStreamConstraints = {
|
|
8
|
+
...MediaCaptureAndStreamsTypes.mediaStreamConstraints,
|
|
9
|
+
}
|
|
10
|
+
type displayMediaStreamOptions = MediaCaptureAndStreamsTypes.displayMediaStreamOptions = {
|
|
11
|
+
...MediaCaptureAndStreamsTypes.displayMediaStreamOptions,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
include EventTarget.Impl({type t = t})
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/enumerateDevices)
|
|
18
|
+
*/
|
|
19
|
+
@send
|
|
20
|
+
external enumerateDevices: t => promise<array<MediaDeviceInfo.t>> = "enumerateDevices"
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/getSupportedConstraints)
|
|
24
|
+
*/
|
|
25
|
+
@send
|
|
26
|
+
external getSupportedConstraints: t => mediaTrackSupportedConstraints = "getSupportedConstraints"
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/getUserMedia)
|
|
30
|
+
*/
|
|
31
|
+
@send
|
|
32
|
+
external getUserMedia: (t, ~constraints: mediaStreamConstraints=?) => promise<MediaStream.t> =
|
|
33
|
+
"getUserMedia"
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices/getDisplayMedia)
|
|
37
|
+
*/
|
|
38
|
+
@send
|
|
39
|
+
external getDisplayMedia: (t, ~options: displayMediaStreamOptions=?) => promise<MediaStream.t> =
|
|
40
|
+
"getDisplayMedia"
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
type t = MediaCaptureAndStreamsTypes.mediaStream = private {
|
|
2
|
+
...MediaCaptureAndStreamsTypes.mediaStream,
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
`make()`
|
|
7
|
+
|
|
8
|
+
Creates a new empty `MediaStream`.
|
|
9
|
+
|
|
10
|
+
```res
|
|
11
|
+
let stream = MediaStream.make()
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
15
|
+
*/
|
|
16
|
+
@new
|
|
17
|
+
external make: unit => t = "MediaStream"
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
`fromMediaStream(mediaStream)`
|
|
21
|
+
|
|
22
|
+
Creates a new `MediaStream` by copying another `MediaStream`.
|
|
23
|
+
|
|
24
|
+
```res
|
|
25
|
+
let copiedStream = MediaStream.fromMediaStream(existingStream)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
29
|
+
*/
|
|
30
|
+
@new
|
|
31
|
+
external fromMediaStream: t => t = "MediaStream"
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
`fromTracks(array<MediaStreamTrack.t>)`
|
|
35
|
+
|
|
36
|
+
Creates a new `MediaStream` from an array of `MediaStreamTrack.t` values.
|
|
37
|
+
|
|
38
|
+
```res
|
|
39
|
+
let stream = MediaStream.fromTracks([audioTrack, videoTrack])
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
43
|
+
*/
|
|
44
|
+
@new
|
|
45
|
+
external fromTracks: array<MediaStreamTrack.t> => t = "MediaStream"
|
|
46
|
+
|
|
47
|
+
include EventTarget.Impl({type t = t})
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/getAudioTracks)
|
|
51
|
+
*/
|
|
52
|
+
@send
|
|
53
|
+
external getAudioTracks: t => array<MediaStreamTrack.t> = "getAudioTracks"
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/getVideoTracks)
|
|
57
|
+
*/
|
|
58
|
+
@send
|
|
59
|
+
external getVideoTracks: t => array<MediaStreamTrack.t> = "getVideoTracks"
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/getTracks)
|
|
63
|
+
*/
|
|
64
|
+
@send
|
|
65
|
+
external getTracks: t => array<MediaStreamTrack.t> = "getTracks"
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/getTrackById)
|
|
69
|
+
*/
|
|
70
|
+
@send
|
|
71
|
+
external getTrackById: (t, string) => MediaStreamTrack.t = "getTrackById"
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/addTrack)
|
|
75
|
+
*/
|
|
76
|
+
@send
|
|
77
|
+
external addTrack: (t, MediaStreamTrack.t) => unit = "addTrack"
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/removeTrack)
|
|
81
|
+
*/
|
|
82
|
+
@send
|
|
83
|
+
external removeTrack: (t, MediaStreamTrack.t) => unit = "removeTrack"
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/clone)
|
|
87
|
+
*/
|
|
88
|
+
@send
|
|
89
|
+
external clone: t => t = "clone"
|