@rescript/webapi 0.1.0-experimental-29b94b3
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/LICENSE +21 -0
- package/README.md +14 -0
- package/package.json +38 -0
- package/rescript.json +19 -0
- package/src/CSSFontLoadingAPI/FontFace.res +34 -0
- package/src/CSSFontLoadingAPI/FontFaceSet.res +112 -0
- package/src/CSSFontLoadingAPI.res +101 -0
- package/src/CanvasAPI/ImageBitmap.res +8 -0
- package/src/CanvasAPI/OffscreenCanvas.res +123 -0
- package/src/CanvasAPI.res +55 -0
- package/src/ChannelMessagingAPI/MessagePort.res +120 -0
- package/src/ChannelMessagingAPI.res +13 -0
- package/src/ClipboardAPI/Clipboard.res +106 -0
- package/src/ClipboardAPI/ClipboardItem.res +21 -0
- package/src/ClipboardAPI.res +31 -0
- package/src/CredentialManagementAPI/CredentialsContainer.res +31 -0
- package/src/CredentialManagementAPI.res +140 -0
- package/src/DOMAPI/Animation.res +137 -0
- package/src/DOMAPI/AnimationEffect.res +19 -0
- package/src/DOMAPI/CSSRuleList.res +7 -0
- package/src/DOMAPI/CSSStyleDeclaration.res +36 -0
- package/src/DOMAPI/CSSStyleSheet.res +32 -0
- package/src/DOMAPI/CSSStyleValue.res +13 -0
- package/src/DOMAPI/CaretPosition.res +4 -0
- package/src/DOMAPI/CharacterData.res +272 -0
- package/src/DOMAPI/Comment.res +278 -0
- package/src/DOMAPI/CustomElementRegistry.res +31 -0
- package/src/DOMAPI/DOMImplementation.res +30 -0
- package/src/DOMAPI/DOMMatrix.res +169 -0
- package/src/DOMAPI/DOMMatrixReadOnly.res +103 -0
- package/src/DOMAPI/DOMPoint.res +29 -0
- package/src/DOMAPI/DOMPointReadOnly.res +24 -0
- package/src/DOMAPI/DOMRect.res +23 -0
- package/src/DOMAPI/DOMRectList.res +4 -0
- package/src/DOMAPI/DOMRectReadOnly.res +17 -0
- package/src/DOMAPI/DOMTokenList.res +72 -0
- package/src/DOMAPI/Document.res +634 -0
- package/src/DOMAPI/DocumentFragment.res +261 -0
- package/src/DOMAPI/DocumentTimeline.res +9 -0
- package/src/DOMAPI/Element.res +634 -0
- package/src/DOMAPI/ElementInternals.res +39 -0
- package/src/DOMAPI/FileList.res +8 -0
- package/src/DOMAPI/HTMLAnchorElement.res +693 -0
- package/src/DOMAPI/HTMLAreaElement.res +687 -0
- package/src/DOMAPI/HTMLAudioElement.res +750 -0
- package/src/DOMAPI/HTMLBRElement.res +686 -0
- package/src/DOMAPI/HTMLBaseElement.res +687 -0
- package/src/DOMAPI/HTMLBodyElement.res +687 -0
- package/src/DOMAPI/HTMLButtonElement.res +714 -0
- package/src/DOMAPI/HTMLCanvasElement.res +741 -0
- package/src/DOMAPI/HTMLCollection.res +15 -0
- package/src/DOMAPI/HTMLCollectionOf.res +16 -0
- package/src/DOMAPI/HTMLDListElement.res +690 -0
- package/src/DOMAPI/HTMLDataElement.res +687 -0
- package/src/DOMAPI/HTMLDataListElement.res +697 -0
- package/src/DOMAPI/HTMLDialogElement.res +715 -0
- package/src/DOMAPI/HTMLDivElement.res +686 -0
- package/src/DOMAPI/HTMLElement.res +685 -0
- package/src/DOMAPI/HTMLEmbedElement.res +693 -0
- package/src/DOMAPI/HTMLFieldSetElement.res +718 -0
- package/src/DOMAPI/HTMLFormControlsCollection.res +16 -0
- package/src/DOMAPI/HTMLFormElement.res +720 -0
- package/src/DOMAPI/HTMLFrameSetElement.res +697 -0
- package/src/DOMAPI/HTMLHRElement.res +686 -0
- package/src/DOMAPI/HTMLHeadElement.res +687 -0
- package/src/DOMAPI/HTMLHeadingElement.res +693 -0
- package/src/DOMAPI/HTMLHtmlElement.res +687 -0
- package/src/DOMAPI/HTMLIFrameElement.res +696 -0
- package/src/DOMAPI/HTMLImageElement.res +696 -0
- package/src/DOMAPI/HTMLInputElement.res +773 -0
- package/src/DOMAPI/HTMLLIElement.res +686 -0
- package/src/DOMAPI/HTMLLabelElement.res +690 -0
- package/src/DOMAPI/HTMLLegendElement.res +693 -0
- package/src/DOMAPI/HTMLLinkElement.res +687 -0
- package/src/DOMAPI/HTMLMapElement.res +686 -0
- package/src/DOMAPI/HTMLMediaElement.res +749 -0
- package/src/DOMAPI/HTMLMenuElement.res +687 -0
- package/src/DOMAPI/HTMLMetaElement.res +687 -0
- package/src/DOMAPI/HTMLMeterElement.res +690 -0
- package/src/DOMAPI/HTMLModElement.res +686 -0
- package/src/DOMAPI/HTMLOListElement.res +690 -0
- package/src/DOMAPI/HTMLObjectElement.res +717 -0
- package/src/DOMAPI/HTMLOptGroupElement.res +697 -0
- package/src/DOMAPI/HTMLOptionElement.res +693 -0
- package/src/DOMAPI/HTMLOptionsCollection.res +21 -0
- package/src/DOMAPI/HTMLOutputElement.res +711 -0
- package/src/DOMAPI/HTMLParagraphElement.res +701 -0
- package/src/DOMAPI/HTMLPictureElement.res +693 -0
- package/src/DOMAPI/HTMLPreElement.res +686 -0
- package/src/DOMAPI/HTMLProgressElement.res +697 -0
- package/src/DOMAPI/HTMLQuoteElement.res +690 -0
- package/src/DOMAPI/HTMLScriptElement.res +699 -0
- package/src/DOMAPI/HTMLSelectElement.res +762 -0
- package/src/DOMAPI/HTMLSlotElement.res +713 -0
- package/src/DOMAPI/HTMLSourceElement.res +693 -0
- package/src/DOMAPI/HTMLSpanElement.res +687 -0
- package/src/DOMAPI/HTMLStyleElement.res +690 -0
- package/src/DOMAPI/HTMLTableCaptionElement.res +714 -0
- package/src/DOMAPI/HTMLTableCellElement.res +701 -0
- package/src/DOMAPI/HTMLTableElement.res +755 -0
- package/src/DOMAPI/HTMLTableRowElement.res +713 -0
- package/src/DOMAPI/HTMLTableSectionElement.res +730 -0
- package/src/DOMAPI/HTMLTemplateElement.res +697 -0
- package/src/DOMAPI/HTMLTextAreaElement.res +758 -0
- package/src/DOMAPI/HTMLTimeElement.res +687 -0
- package/src/DOMAPI/HTMLTitleElement.res +690 -0
- package/src/DOMAPI/HTMLTrackElement.res +690 -0
- package/src/DOMAPI/HTMLUListElement.res +690 -0
- package/src/DOMAPI/HTMLVideoElement.res +778 -0
- package/src/DOMAPI/IdleDeadline.res +7 -0
- package/src/DOMAPI/ImageData.res +18 -0
- package/src/DOMAPI/Location.res +22 -0
- package/src/DOMAPI/MediaList.res +19 -0
- package/src/DOMAPI/MediaQueryList.res +82 -0
- package/src/DOMAPI/NamedNodeMap.res +45 -0
- package/src/DOMAPI/Navigator.res +114 -0
- package/src/DOMAPI/Node.res +179 -0
- package/src/DOMAPI/NodeFilter.res +4 -0
- package/src/DOMAPI/NodeIterator.res +13 -0
- package/src/DOMAPI/NodeList.res +8 -0
- package/src/DOMAPI/NodeListOf.res +9 -0
- package/src/DOMAPI/Range.res +149 -0
- package/src/DOMAPI/SVGGraphicsElement.res +675 -0
- package/src/DOMAPI/SVGLength.res +11 -0
- package/src/DOMAPI/ScreenOrientation.res +88 -0
- package/src/DOMAPI/Selection.res +103 -0
- package/src/DOMAPI/ShadowRoot.res +274 -0
- package/src/DOMAPI/StylePropertyMap.res +50 -0
- package/src/DOMAPI/StylePropertyMapReadOnly.res +13 -0
- package/src/DOMAPI/StyleSheetList.res +7 -0
- package/src/DOMAPI/Text.res +285 -0
- package/src/DOMAPI/TextTrackList.res +89 -0
- package/src/DOMAPI/TimeRanges.res +19 -0
- package/src/DOMAPI/TreeWalker.res +43 -0
- package/src/DOMAPI/VideoColorSpace.res +13 -0
- package/src/DOMAPI/VideoFrame.res +111 -0
- package/src/DOMAPI/Window.res +582 -0
- package/src/DOMAPI/XPathExpression.res +12 -0
- package/src/DOMAPI/XPathResult.res +13 -0
- package/src/DOMAPI.res +9668 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +132 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +13 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +13 -0
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +28 -0
- package/src/EncryptedMediaExtensionsAPI.res +100 -0
- package/src/EventAPI/AbortController.res +15 -0
- package/src/EventAPI/AbortSignal.res +106 -0
- package/src/EventAPI/Event.res +35 -0
- package/src/EventAPI/EventTarget.res +86 -0
- package/src/EventAPI.res +215 -0
- package/src/FetchAPI/FormData.res +58 -0
- package/src/FetchAPI/Headers.res +50 -0
- package/src/FetchAPI/Request.res +57 -0
- package/src/FetchAPI/Response.res +105 -0
- package/src/FetchAPI/URLSearchParams.res +68 -0
- package/src/FetchAPI.res +287 -0
- package/src/FileAPI/Blob.res +37 -0
- package/src/FileAPI/File.res +42 -0
- package/src/FileAPI/FileSystemDirectoryHandle.res +46 -0
- package/src/FileAPI/FileSystemFileHandle.res +23 -0
- package/src/FileAPI/FileSystemHandle.res +7 -0
- package/src/FileAPI/FileSystemWritableFileStream.res +63 -0
- package/src/FileAPI/ReadableStream.res +61 -0
- package/src/FileAPI/WritableStream.res +29 -0
- package/src/FileAPI/WritableStreamDefaultController.res +8 -0
- package/src/FileAPI.res +218 -0
- package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryEntry.res +42 -0
- package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryReader.res +12 -0
- package/src/FileAndDirectoryEntriesAPI/FileSystemEntry.res +11 -0
- package/src/FileAndDirectoryEntriesAPI.res +87 -0
- package/src/GamepadAPI/GamepadHapticActuator.res +17 -0
- package/src/GamepadAPI.res +85 -0
- package/src/GeolocationAPI/Geolocation.res +29 -0
- package/src/GeolocationAPI/GeolocationCoordinates.res +7 -0
- package/src/GeolocationAPI/GeolocationPosition.res +7 -0
- package/src/GeolocationAPI.res +78 -0
- package/src/Global.res +302 -0
- package/src/HistoryAPI/History.res +33 -0
- package/src/HistoryAPI.res +26 -0
- package/src/IndexedDBAPI/IDBDatabase.res +135 -0
- package/src/IndexedDBAPI/IDBFactory.res +31 -0
- package/src/IndexedDBAPI/IDBIndex.res +74 -0
- package/src/IndexedDBAPI/IDBObjectStore.res +167 -0
- package/src/IndexedDBAPI/IDBTransaction.res +102 -0
- package/src/IndexedDBAPI.res +205 -0
- package/src/MediaCapabilitiesAPI/MediaCapabilities.res +19 -0
- package/src/MediaCapabilitiesAPI.res +81 -0
- package/src/MediaCaptureAndStreamsAPI/MediaDeviceInfo.res +7 -0
- package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +113 -0
- package/src/MediaCaptureAndStreamsAPI/MediaStream.res +142 -0
- package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +122 -0
- package/src/MediaCaptureAndStreamsAPI.res +194 -0
- package/src/MediaSessionAPI/MediaMetadata.res +7 -0
- package/src/MediaSessionAPI/MediaSession.res +17 -0
- package/src/MediaSessionAPI.res +83 -0
- package/src/NotificationAPI/Notification.res +102 -0
- package/src/NotificationAPI.res +82 -0
- package/src/PerformanceAPI/Performance.res +169 -0
- package/src/PerformanceAPI/PerformanceEntry.res +7 -0
- package/src/PerformanceAPI/PerformanceMark.res +15 -0
- package/src/PerformanceAPI.res +86 -0
- package/src/PermissionsAPI/Permissions.res +7 -0
- package/src/PermissionsAPI.res +39 -0
- package/src/PictureInPicture.res +18 -0
- package/src/PictureInPictureAPI.res +18 -0
- package/src/Prelude/DOMException.res +7 -0
- package/src/Prelude/DOMStringList.res +15 -0
- package/src/Prelude.res +39 -0
- package/src/PushManagerAPI/PushManager.res +25 -0
- package/src/PushManagerAPI/PushSubscription.res +19 -0
- package/src/PushManagerAPI.res +67 -0
- package/src/RemotePlaybackAPI/RemotePlayback.res +102 -0
- package/src/RemotePlaybackAPI.res +21 -0
- package/src/ResizeObserverAPI/ResizeObserver.res +27 -0
- package/src/ResizeObserverAPI.res +58 -0
- package/src/ScreenWakeLockAPI/WakeLock.res +7 -0
- package/src/ScreenWakeLockAPI/WakeLockSentinel.res +88 -0
- package/src/ScreenWakeLockAPI.res +26 -0
- package/src/ServiceWorkerAPI/Cache.res +100 -0
- package/src/ServiceWorkerAPI/CacheStorage.res +46 -0
- package/src/ServiceWorkerAPI/NavigationPreloadManager.res +25 -0
- package/src/ServiceWorkerAPI/ServiceWorker.res +101 -0
- package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +114 -0
- package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +114 -0
- package/src/ServiceWorkerAPI.res +134 -0
- package/src/StorageAPI/StorageManager.res +26 -0
- package/src/StorageAPI.res +10 -0
- package/src/ViewTransitionsAPI/ViewTransition.res +7 -0
- package/src/ViewTransitionsAPI.res +23 -0
- package/src/VisualViewportAPI.res +38 -0
- package/src/WebAudioAPI/AnalyserNode.res +180 -0
- package/src/WebAudioAPI/AudioBuffer.res +35 -0
- package/src/WebAudioAPI/AudioBufferSourceNode.res +183 -0
- package/src/WebAudioAPI/AudioContext.res +266 -0
- package/src/WebAudioAPI/AudioListener.res +1 -0
- package/src/WebAudioAPI/AudioNode.res +143 -0
- package/src/WebAudioAPI/AudioParam.res +56 -0
- package/src/WebAudioAPI/AudioProcessingEvent.res +38 -0
- package/src/WebAudioAPI/AudioScheduledSourceNode.res +171 -0
- package/src/WebAudioAPI/AudioWorkletNode.res +160 -0
- package/src/WebAudioAPI/BaseAudioContext.res +212 -0
- package/src/WebAudioAPI/BiquadFilterNode.res +168 -0
- package/src/WebAudioAPI/ChannelMergerNode.res +157 -0
- package/src/WebAudioAPI/ChannelSplitterNode.res +159 -0
- package/src/WebAudioAPI/ConstantSourceNode.res +172 -0
- package/src/WebAudioAPI/ConvolverNode.res +157 -0
- package/src/WebAudioAPI/DelayNode.res +150 -0
- package/src/WebAudioAPI/DynamicsCompressorNode.res +162 -0
- package/src/WebAudioAPI/GainNode.res +149 -0
- package/src/WebAudioAPI/IIRFilterNode.res +168 -0
- package/src/WebAudioAPI/MediaElementAudioSourceNode.res +168 -0
- package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +168 -0
- package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +168 -0
- package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +40 -0
- package/src/WebAudioAPI/OfflineAudioContext.res +246 -0
- package/src/WebAudioAPI/OscillatorNode.res +176 -0
- package/src/WebAudioAPI/PannerNode.res +150 -0
- package/src/WebAudioAPI/PeriodicWave.res +8 -0
- package/src/WebAudioAPI/StereoPannerNode.res +157 -0
- package/src/WebAudioAPI/WaveShaperNode.res +157 -0
- package/src/WebAudioAPI/Worklet.res +13 -0
- package/src/WebAudioAPI.res +1271 -0
- package/src/WebCryptoAPI/Crypto.res +13 -0
- package/src/WebCryptoAPI/SubtleCrypto.res +173 -0
- package/src/WebCryptoAPI.res +71 -0
- package/src/WebLocksAPI/LockManager.res +29 -0
- package/src/WebLocksAPI.res +47 -0
- package/src/WebMIDIAPI.res +37 -0
- package/src/WebSocketsAPI/CloseEvent.res +37 -0
- package/src/WebSocketsAPI/MessageEvent.res +38 -0
- package/src/WebSocketsAPI/WebSocket.res +130 -0
- package/src/WebSocketsAPI.res +125 -0
- package/src/WebSpeechAPI/SpeechSynthesis.res +112 -0
- package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +88 -0
- package/src/WebSpeechAPI.res +82 -0
- package/src/WebStorageAPI/Storage.res +44 -0
- package/src/WebStorageAPI/StorageEvent.res +37 -0
- package/src/WebStorageAPI.res +57 -0
- package/src/WebVTTAPI/TextTrack.res +96 -0
- package/src/WebVTTAPI/TextTrackCueList.res +10 -0
- package/src/WebVTTAPI.res +122 -0
package/src/FileAPI.res
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
|
|
3
|
+
open Prelude
|
|
4
|
+
open EventAPI
|
|
5
|
+
|
|
6
|
+
type endingType =
|
|
7
|
+
| @as("native") Native
|
|
8
|
+
| @as("transparent") Transparent
|
|
9
|
+
|
|
10
|
+
type readableStreamReaderMode = | @as("byob") Byob
|
|
11
|
+
|
|
12
|
+
type fileSystemHandleKind =
|
|
13
|
+
| @as("directory") Directory
|
|
14
|
+
| @as("file") File
|
|
15
|
+
|
|
16
|
+
type writeCommandType =
|
|
17
|
+
| @as("seek") Seek
|
|
18
|
+
| @as("truncate") Truncate
|
|
19
|
+
| @as("write") Write
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
|
|
23
|
+
[See Blob on MDN](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
24
|
+
*/
|
|
25
|
+
type blob = {
|
|
26
|
+
/**
|
|
27
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob/size)
|
|
28
|
+
*/
|
|
29
|
+
size: int,
|
|
30
|
+
/**
|
|
31
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
32
|
+
*/
|
|
33
|
+
@as("type")
|
|
34
|
+
type_: string,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
|
39
|
+
[See ReadableStream on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
40
|
+
*/
|
|
41
|
+
type readableStream<'r> = {
|
|
42
|
+
/**
|
|
43
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
44
|
+
*/
|
|
45
|
+
locked: bool,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.
|
|
50
|
+
[See WritableStream on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
51
|
+
*/
|
|
52
|
+
type writableStream<'w> = {
|
|
53
|
+
/**
|
|
54
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
55
|
+
*/
|
|
56
|
+
locked: bool,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
|
|
61
|
+
[See WritableStreamDefaultController on MDN](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
62
|
+
*/
|
|
63
|
+
type writableStreamDefaultController = {
|
|
64
|
+
/**
|
|
65
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
|
|
66
|
+
*/
|
|
67
|
+
signal: abortSignal,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
Provides information about files and allows JavaScript in a web page to access their content.
|
|
72
|
+
[See File on MDN](https://developer.mozilla.org/docs/Web/API/File)
|
|
73
|
+
*/
|
|
74
|
+
type file = {
|
|
75
|
+
...blob,
|
|
76
|
+
/**
|
|
77
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
78
|
+
*/
|
|
79
|
+
name: string,
|
|
80
|
+
/**
|
|
81
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
82
|
+
*/
|
|
83
|
+
lastModified: int,
|
|
84
|
+
/**
|
|
85
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath)
|
|
86
|
+
*/
|
|
87
|
+
webkitRelativePath: string,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
[See FileSystemHandle on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle)
|
|
92
|
+
*/
|
|
93
|
+
type fileSystemHandle = {
|
|
94
|
+
/**
|
|
95
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/kind)
|
|
96
|
+
*/
|
|
97
|
+
kind: fileSystemHandleKind,
|
|
98
|
+
/**
|
|
99
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/name)
|
|
100
|
+
*/
|
|
101
|
+
name: string,
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
[See FileSystemDirectoryHandle on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle)
|
|
106
|
+
*/
|
|
107
|
+
type fileSystemDirectoryHandle = {
|
|
108
|
+
...fileSystemHandle,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
[See FileSystemFileHandle on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle)
|
|
113
|
+
*/
|
|
114
|
+
type fileSystemFileHandle = {
|
|
115
|
+
...fileSystemHandle,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
[See FileSystemWritableFileStream on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream)
|
|
120
|
+
*/
|
|
121
|
+
type fileSystemWritableFileStream = {
|
|
122
|
+
...writableStream<any>,
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@unboxed
|
|
126
|
+
type blobPart =
|
|
127
|
+
| String(string)
|
|
128
|
+
| Blob(blob)
|
|
129
|
+
// | ArrayBuffer(ArrayBuffer.t)
|
|
130
|
+
// | TypedArray(TypedArray.t<int>)
|
|
131
|
+
|
|
132
|
+
type queuingStrategy<'t> = any
|
|
133
|
+
|
|
134
|
+
type underlyingSink<'t> = any
|
|
135
|
+
|
|
136
|
+
type readableStreamReader<'t> = any
|
|
137
|
+
|
|
138
|
+
type writableStreamDefaultWriter<'t> = any
|
|
139
|
+
|
|
140
|
+
type fileSystemWriteChunkType = any
|
|
141
|
+
|
|
142
|
+
type underlyingSourceCancelCallback = JSON.t => Promise.t<unit>
|
|
143
|
+
|
|
144
|
+
type blobPropertyBag = {
|
|
145
|
+
@as("type") mutable type_?: string,
|
|
146
|
+
mutable endings?: endingType,
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type underlyingByteSource = {
|
|
150
|
+
@as("type") mutable type_: unknown,
|
|
151
|
+
mutable autoAllocateChunkSize?: int,
|
|
152
|
+
mutable start?: unknown,
|
|
153
|
+
mutable pull?: unknown,
|
|
154
|
+
mutable cancel?: underlyingSourceCancelCallback,
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
type readableStreamGetReaderOptions = {
|
|
158
|
+
/**
|
|
159
|
+
Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
160
|
+
|
|
161
|
+
This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
|
|
162
|
+
*/
|
|
163
|
+
mutable mode?: readableStreamReaderMode,
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
type readableWritablePair<'r, 'w> = {
|
|
167
|
+
mutable readable: readableStream<'r>,
|
|
168
|
+
/**
|
|
169
|
+
Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
|
|
170
|
+
|
|
171
|
+
Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
|
|
172
|
+
*/
|
|
173
|
+
mutable writable: writableStream<'w>,
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type streamPipeOptions = {
|
|
177
|
+
/**
|
|
178
|
+
Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
|
179
|
+
|
|
180
|
+
Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
|
|
181
|
+
|
|
182
|
+
Errors and closures of the source and destination streams propagate as follows:
|
|
183
|
+
|
|
184
|
+
An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
|
|
185
|
+
|
|
186
|
+
An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
|
|
187
|
+
|
|
188
|
+
When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
|
|
189
|
+
|
|
190
|
+
If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
|
|
191
|
+
|
|
192
|
+
The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
|
|
193
|
+
*/
|
|
194
|
+
mutable preventClose?: bool,
|
|
195
|
+
mutable preventAbort?: bool,
|
|
196
|
+
mutable preventCancel?: bool,
|
|
197
|
+
mutable signal?: abortSignal,
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
type filePropertyBag = {
|
|
201
|
+
...blobPropertyBag,
|
|
202
|
+
mutable lastModified?: int,
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
type fileSystemGetFileOptions = {mutable create?: bool}
|
|
206
|
+
|
|
207
|
+
type fileSystemGetDirectoryOptions = {mutable create?: bool}
|
|
208
|
+
|
|
209
|
+
type fileSystemRemoveOptions = {mutable recursive?: bool}
|
|
210
|
+
|
|
211
|
+
type fileSystemCreateWritableOptions = {mutable keepExistingData?: bool}
|
|
212
|
+
|
|
213
|
+
type writeParams = {
|
|
214
|
+
@as("type") mutable type_: writeCommandType,
|
|
215
|
+
mutable size?: Null.t<int>,
|
|
216
|
+
mutable position?: Null.t<int>,
|
|
217
|
+
mutable data?: Null.t<unknown>,
|
|
218
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
open FileAndDirectoryEntriesAPI
|
|
2
|
+
|
|
3
|
+
external asFileSystemEntry: fileSystemDirectoryEntry => fileSystemEntry = "%identity"
|
|
4
|
+
/**
|
|
5
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent)
|
|
6
|
+
*/
|
|
7
|
+
@send
|
|
8
|
+
external getParent: (
|
|
9
|
+
fileSystemDirectoryEntry,
|
|
10
|
+
~successCallback: fileSystemEntryCallback=?,
|
|
11
|
+
~errorCallback: errorCallback=?,
|
|
12
|
+
) => unit = "getParent"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/createReader)
|
|
16
|
+
*/
|
|
17
|
+
@send
|
|
18
|
+
external createReader: fileSystemDirectoryEntry => fileSystemDirectoryReader = "createReader"
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/getFile)
|
|
22
|
+
*/
|
|
23
|
+
@send
|
|
24
|
+
external getFile: (
|
|
25
|
+
fileSystemDirectoryEntry,
|
|
26
|
+
~path: string=?,
|
|
27
|
+
~options: fileSystemFlags=?,
|
|
28
|
+
~successCallback: fileSystemEntryCallback=?,
|
|
29
|
+
~errorCallback: errorCallback=?,
|
|
30
|
+
) => unit = "getFile"
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry/getDirectory)
|
|
34
|
+
*/
|
|
35
|
+
@send
|
|
36
|
+
external getDirectory: (
|
|
37
|
+
fileSystemDirectoryEntry,
|
|
38
|
+
~path: string=?,
|
|
39
|
+
~options: fileSystemFlags=?,
|
|
40
|
+
~successCallback: fileSystemEntryCallback=?,
|
|
41
|
+
~errorCallback: errorCallback=?,
|
|
42
|
+
) => unit = "getDirectory"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
open DOMAPI
|
|
2
|
+
open FileAndDirectoryEntriesAPI
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader/readEntries)
|
|
6
|
+
*/
|
|
7
|
+
@send
|
|
8
|
+
external readEntries: (
|
|
9
|
+
fileSystemDirectoryReader,
|
|
10
|
+
~successCallback: fileSystemEntriesCallback,
|
|
11
|
+
~errorCallback: errorCallback=?,
|
|
12
|
+
) => unit = "readEntries"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
open FileAndDirectoryEntriesAPI
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent)
|
|
5
|
+
*/
|
|
6
|
+
@send
|
|
7
|
+
external getParent: (
|
|
8
|
+
fileSystemEntry,
|
|
9
|
+
~successCallback: fileSystemEntryCallback=?,
|
|
10
|
+
~errorCallback: errorCallback=?,
|
|
11
|
+
) => unit = "getParent"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
|
|
3
|
+
open Prelude
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
[See FileSystemEntry on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry)
|
|
7
|
+
*/
|
|
8
|
+
type rec fileSystemEntry = {
|
|
9
|
+
/**
|
|
10
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/isFile)
|
|
11
|
+
*/
|
|
12
|
+
isFile: bool,
|
|
13
|
+
/**
|
|
14
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/isDirectory)
|
|
15
|
+
*/
|
|
16
|
+
isDirectory: bool,
|
|
17
|
+
/**
|
|
18
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/name)
|
|
19
|
+
*/
|
|
20
|
+
name: string,
|
|
21
|
+
/**
|
|
22
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/fullPath)
|
|
23
|
+
*/
|
|
24
|
+
fullPath: string,
|
|
25
|
+
/**
|
|
26
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/filesystem)
|
|
27
|
+
*/
|
|
28
|
+
filesystem: fileSystem,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
[See FileSystemDirectoryEntry on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry)
|
|
33
|
+
*/
|
|
34
|
+
and fileSystemDirectoryEntry = {
|
|
35
|
+
// Base properties from FileSystemEntry
|
|
36
|
+
/**
|
|
37
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/isFile)
|
|
38
|
+
*/
|
|
39
|
+
isFile: bool,
|
|
40
|
+
/**
|
|
41
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/isDirectory)
|
|
42
|
+
*/
|
|
43
|
+
isDirectory: bool,
|
|
44
|
+
/**
|
|
45
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/name)
|
|
46
|
+
*/
|
|
47
|
+
name: string,
|
|
48
|
+
/**
|
|
49
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/fullPath)
|
|
50
|
+
*/
|
|
51
|
+
fullPath: string,
|
|
52
|
+
/**
|
|
53
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/filesystem)
|
|
54
|
+
*/
|
|
55
|
+
filesystem: fileSystem,
|
|
56
|
+
// End base properties from FileSystemEntry
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
[See FileSystem on MDN](https://developer.mozilla.org/docs/Web/API/FileSystem)
|
|
61
|
+
*/
|
|
62
|
+
and fileSystem = {
|
|
63
|
+
/**
|
|
64
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystem/name)
|
|
65
|
+
*/
|
|
66
|
+
name: string,
|
|
67
|
+
/**
|
|
68
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystem/root)
|
|
69
|
+
*/
|
|
70
|
+
root: fileSystemDirectoryEntry,
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
[See FileSystemDirectoryReader on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader)
|
|
75
|
+
*/
|
|
76
|
+
type fileSystemDirectoryReader = {}
|
|
77
|
+
|
|
78
|
+
type fileSystemFlags = {
|
|
79
|
+
mutable create?: bool,
|
|
80
|
+
mutable exclusive?: bool,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
type fileSystemEntryCallback = fileSystemEntry => unit
|
|
84
|
+
|
|
85
|
+
type errorCallback = domException => unit
|
|
86
|
+
|
|
87
|
+
type fileSystemEntriesCallback = array<fileSystemEntry> => unit
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
open GamepadAPI
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/playEffect)
|
|
5
|
+
*/
|
|
6
|
+
@send
|
|
7
|
+
external playEffect: (
|
|
8
|
+
gamepadHapticActuator,
|
|
9
|
+
~type_: gamepadHapticEffectType,
|
|
10
|
+
~params: gamepadEffectParameters=?,
|
|
11
|
+
) => Promise.t<gamepadHapticsResult> = "playEffect"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/reset)
|
|
15
|
+
*/
|
|
16
|
+
@send
|
|
17
|
+
external reset: gamepadHapticActuator => Promise.t<gamepadHapticsResult> = "reset"
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
type gamepadMappingType =
|
|
3
|
+
| @as("standard") Standard
|
|
4
|
+
| @as("xr-standard") XrStandard
|
|
5
|
+
|
|
6
|
+
type gamepadHapticEffectType =
|
|
7
|
+
| @as("dual-rumble") DualRumble
|
|
8
|
+
| @as("trigger-rumble") TriggerRumble
|
|
9
|
+
|
|
10
|
+
type gamepadHapticsResult =
|
|
11
|
+
| @as("complete") Complete
|
|
12
|
+
| @as("preempted") Preempted
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
An individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.
|
|
16
|
+
[See GamepadButton on MDN](https://developer.mozilla.org/docs/Web/API/GamepadButton)
|
|
17
|
+
*/
|
|
18
|
+
type gamepadButton = {
|
|
19
|
+
/**
|
|
20
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadButton/pressed)
|
|
21
|
+
*/
|
|
22
|
+
pressed: bool,
|
|
23
|
+
/**
|
|
24
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadButton/touched)
|
|
25
|
+
*/
|
|
26
|
+
touched: bool,
|
|
27
|
+
/**
|
|
28
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadButton/value)
|
|
29
|
+
*/
|
|
30
|
+
value: float,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
|
|
35
|
+
[See GamepadHapticActuator on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator)
|
|
36
|
+
*/
|
|
37
|
+
type gamepadHapticActuator = {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.
|
|
41
|
+
[See Gamepad on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad)
|
|
42
|
+
*/
|
|
43
|
+
type gamepad = {
|
|
44
|
+
/**
|
|
45
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/id)
|
|
46
|
+
*/
|
|
47
|
+
id: string,
|
|
48
|
+
/**
|
|
49
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/index)
|
|
50
|
+
*/
|
|
51
|
+
index: int,
|
|
52
|
+
/**
|
|
53
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/connected)
|
|
54
|
+
*/
|
|
55
|
+
connected: bool,
|
|
56
|
+
/**
|
|
57
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/timestamp)
|
|
58
|
+
*/
|
|
59
|
+
timestamp: float,
|
|
60
|
+
/**
|
|
61
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/mapping)
|
|
62
|
+
*/
|
|
63
|
+
mapping: gamepadMappingType,
|
|
64
|
+
/**
|
|
65
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/axes)
|
|
66
|
+
*/
|
|
67
|
+
axes: array<float>,
|
|
68
|
+
/**
|
|
69
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/buttons)
|
|
70
|
+
*/
|
|
71
|
+
buttons: array<gamepadButton>,
|
|
72
|
+
/**
|
|
73
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Gamepad/vibrationActuator)
|
|
74
|
+
*/
|
|
75
|
+
vibrationActuator: gamepadHapticActuator,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type gamepadEffectParameters = {
|
|
79
|
+
mutable duration?: int,
|
|
80
|
+
mutable startDelay?: int,
|
|
81
|
+
mutable strongMagnitude?: float,
|
|
82
|
+
mutable weakMagnitude?: float,
|
|
83
|
+
mutable leftTrigger?: float,
|
|
84
|
+
mutable rightTrigger?: float,
|
|
85
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
open GeolocationAPI
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/getCurrentPosition)
|
|
5
|
+
*/
|
|
6
|
+
@send
|
|
7
|
+
external getCurrentPosition: (
|
|
8
|
+
geolocation,
|
|
9
|
+
~successCallback: positionCallback,
|
|
10
|
+
~errorCallback: positionErrorCallback=?,
|
|
11
|
+
~options: positionOptions=?,
|
|
12
|
+
) => unit = "getCurrentPosition"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/watchPosition)
|
|
16
|
+
*/
|
|
17
|
+
@send
|
|
18
|
+
external watchPosition: (
|
|
19
|
+
geolocation,
|
|
20
|
+
~successCallback: positionCallback,
|
|
21
|
+
~errorCallback: positionErrorCallback=?,
|
|
22
|
+
~options: positionOptions=?,
|
|
23
|
+
) => int = "watchPosition"
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/clearWatch)
|
|
27
|
+
*/
|
|
28
|
+
@send
|
|
29
|
+
external clearWatch: (geolocation, int) => unit = "clearWatch"
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
/**
|
|
3
|
+
An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location.
|
|
4
|
+
[See Geolocation on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation)
|
|
5
|
+
*/
|
|
6
|
+
type geolocation = {}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
[See GeolocationCoordinates on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates)
|
|
10
|
+
*/
|
|
11
|
+
type geolocationCoordinates = {
|
|
12
|
+
/**
|
|
13
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/accuracy)
|
|
14
|
+
*/
|
|
15
|
+
accuracy: float,
|
|
16
|
+
/**
|
|
17
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/latitude)
|
|
18
|
+
*/
|
|
19
|
+
latitude: float,
|
|
20
|
+
/**
|
|
21
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/longitude)
|
|
22
|
+
*/
|
|
23
|
+
longitude: float,
|
|
24
|
+
/**
|
|
25
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/altitude)
|
|
26
|
+
*/
|
|
27
|
+
altitude: Null.t<float>,
|
|
28
|
+
/**
|
|
29
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/altitudeAccuracy)
|
|
30
|
+
*/
|
|
31
|
+
altitudeAccuracy: Null.t<float>,
|
|
32
|
+
/**
|
|
33
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/heading)
|
|
34
|
+
*/
|
|
35
|
+
heading: Null.t<float>,
|
|
36
|
+
/**
|
|
37
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/speed)
|
|
38
|
+
*/
|
|
39
|
+
speed: Null.t<float>,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
[See GeolocationPosition on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPosition)
|
|
44
|
+
*/
|
|
45
|
+
type geolocationPosition = {
|
|
46
|
+
/**
|
|
47
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPosition/coords)
|
|
48
|
+
*/
|
|
49
|
+
coords: geolocationCoordinates,
|
|
50
|
+
/**
|
|
51
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPosition/timestamp)
|
|
52
|
+
*/
|
|
53
|
+
timestamp: int,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
[See GeolocationPositionError on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPositionError)
|
|
58
|
+
*/
|
|
59
|
+
type geolocationPositionError = {
|
|
60
|
+
/**
|
|
61
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPositionError/code)
|
|
62
|
+
*/
|
|
63
|
+
code: int,
|
|
64
|
+
/**
|
|
65
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPositionError/message)
|
|
66
|
+
*/
|
|
67
|
+
message: string,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type positionOptions = {
|
|
71
|
+
mutable enableHighAccuracy?: bool,
|
|
72
|
+
mutable timeout?: int,
|
|
73
|
+
mutable maximumAge?: int,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type positionCallback = geolocationPosition => unit
|
|
77
|
+
|
|
78
|
+
type positionErrorCallback = geolocationPositionError => unit
|