@rescript/webapi 0.1.0-alpha-b1d58f9
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 +35 -0
- package/package.json +61 -0
- package/rescript.json +557 -0
- package/src/animation/Animation.res +149 -0
- package/src/animation/AnimationEffect.res +71 -0
- package/src/animation/DocumentTimeline.res +8 -0
- package/src/canvas/Canvas.res +179 -0
- package/src/canvas/CanvasGradient.res +11 -0
- package/src/canvas/CanvasPattern.res +11 -0
- package/src/canvas/CanvasRenderingContext2D.res +868 -0
- package/src/canvas/CanvasTypes.res +452 -0
- package/src/canvas/FillStyle.res +25 -0
- package/src/canvas/HTMLCanvasElement.res +101 -0
- package/src/canvas/ImageBitmap.res +6 -0
- package/src/canvas/ImageBitmapRenderingContext.res +9 -0
- package/src/canvas/ImageData.res +17 -0
- package/src/canvas/OffscreenCanvas.res +87 -0
- package/src/canvas/Path2D.res +186 -0
- package/src/canvas/VideoColorSpace.res +11 -0
- package/src/canvas/VideoFrame.res +217 -0
- package/src/core/ArrayBufferTypedArrayOrDataView.res +4 -0
- package/src/core/DOM.res +1026 -0
- package/src/core/EventType.res +108 -0
- package/src/crypto/Crypto.res +11 -0
- package/src/crypto/SubtleCrypto.res +173 -0
- package/src/crypto/WebCryptoTypes.res +71 -0
- package/src/css-font-loading/BaseCSSFontLoading.res +24 -0
- package/src/css-font-loading/CssFontLoadingTypes.res +92 -0
- package/src/css-font-loading/FontFace.res +62 -0
- package/src/css-font-loading/FontFaceSet.res +38 -0
- package/src/cssom/CSSRuleList.res +5 -0
- package/src/cssom/CSSStyleDeclaration.res +1734 -0
- package/src/cssom/CSSStyleValue.res +17 -0
- package/src/cssom/MediaList.res +29 -0
- package/src/cssom/MediaQueryList.res +18 -0
- package/src/cssom/StylePropertyMap.res +56 -0
- package/src/cssom/StylePropertyMapReadOnly.res +22 -0
- package/src/cssom/StyleSheet.res +152 -0
- package/src/cssom/StyleSheetList.res +17 -0
- package/src/device/GamepadHapticActuator.res +16 -0
- package/src/device/GamepadTypes.res +86 -0
- package/src/device/Geolocation.res +31 -0
- package/src/device/GeolocationCoordinates.res +5 -0
- package/src/device/GeolocationPosition.res +5 -0
- package/src/device/GeolocationTypes.res +81 -0
- package/src/device/LockManager.res +26 -0
- package/src/device/ScreenOrientation.res +7 -0
- package/src/device/ScreenWakeLockTypes.res +26 -0
- package/src/device/WakeLock.res +8 -0
- package/src/device/WakeLockSentinel.res +7 -0
- package/src/device/WebLocksTypes.res +45 -0
- package/src/device/WebMIDI.res +7 -0
- package/src/device/WebMidiTypes.res +36 -0
- package/src/dom-nodes/AbstractRange.res +30 -0
- package/src/dom-nodes/Attr.res +101 -0
- package/src/dom-nodes/CDATASection.res +7 -0
- package/src/dom-nodes/CaretPosition.res +2 -0
- package/src/dom-nodes/CharacterData.res +199 -0
- package/src/dom-nodes/Comment.res +15 -0
- package/src/dom-nodes/DOMImplementation.res +131 -0
- package/src/dom-nodes/DOMTree.res +1653 -0
- package/src/dom-nodes/DocumentFragment.res +96 -0
- package/src/dom-nodes/Element.res +509 -0
- package/src/dom-nodes/ElementInternals.res +39 -0
- package/src/dom-nodes/HTML.res +11 -0
- package/src/dom-nodes/HTMLCollection.res +25 -0
- package/src/dom-nodes/NamedNodeMap.res +46 -0
- package/src/dom-nodes/Node.res +114 -0
- package/src/dom-nodes/NodeFilter.res +4 -0
- package/src/dom-nodes/NodeIterator.res +38 -0
- package/src/dom-nodes/NodeList.res +6 -0
- package/src/dom-nodes/ProcessingInstruction.res +15 -0
- package/src/dom-nodes/Range.res +156 -0
- package/src/dom-nodes/Selection.res +137 -0
- package/src/dom-nodes/ShadowRoot.res +23 -0
- package/src/dom-nodes/StaticRange.res +6 -0
- package/src/dom-nodes/Text.res +31 -0
- package/src/dom-nodes/TreeWalker.res +65 -0
- package/src/dom-platform/DOMException.res +7 -0
- package/src/dom-platform/DOMStringList.res +15 -0
- package/src/dom-platform/DOMStringMap.res +5 -0
- package/src/dom-platform/DOMTokenList.res +70 -0
- package/src/event/AbortController.res +9 -0
- package/src/event/AbortSignal.res +25 -0
- package/src/event/Event.res +76 -0
- package/src/event/EventTarget.res +91 -0
- package/src/event/ExtendableEvent.res +14 -0
- package/src/fetch/BodyInit.res +46 -0
- package/src/fetch/Fetch.res +12 -0
- package/src/fetch/FetchTypes.res +282 -0
- package/src/fetch/FormData.res +71 -0
- package/src/fetch/FormDataEntryValue.res +2 -0
- package/src/fetch/Headers.res +59 -0
- package/src/fetch/HeadersInit.res +16 -0
- package/src/fetch/Request.res +61 -0
- package/src/fetch/Response.res +127 -0
- package/src/file/BaseFileAndDirectoryEntries.res +72 -0
- package/src/file/Blob.res +48 -0
- package/src/file/File.res +15 -0
- package/src/file/FileAndDirectoryEntriesTypes.res +35 -0
- package/src/file/FileList.res +16 -0
- package/src/file/FileSystemDirectoryEntry.res +42 -0
- package/src/file/FileSystemDirectoryHandle.res +49 -0
- package/src/file/FileSystemDirectoryReader.res +9 -0
- package/src/file/FileSystemEntry.res +9 -0
- package/src/file/FileSystemFileHandle.res +25 -0
- package/src/file/FileSystemHandle.res +6 -0
- package/src/file/FileSystemWritableFileStream.res +65 -0
- package/src/file/FileTypes.res +225 -0
- package/src/file/ReadableStream.res +79 -0
- package/src/file/WritableStream.res +27 -0
- package/src/file/WritableStreamDefaultController.res +5 -0
- package/src/geometry/DOMMatrix.res +206 -0
- package/src/geometry/DOMMatrixReadOnly.res +140 -0
- package/src/geometry/DOMPoint.res +28 -0
- package/src/geometry/DOMPointReadOnly.res +22 -0
- package/src/geometry/DOMRect.res +22 -0
- package/src/geometry/DOMRectList.res +2 -0
- package/src/geometry/DOMRectReadOnly.res +19 -0
- package/src/html/HTMLAnchorElement.res +373 -0
- package/src/html/HTMLAreaElement.res +353 -0
- package/src/html/HTMLBRElement.res +9 -0
- package/src/html/HTMLBaseElement.res +20 -0
- package/src/html/HTMLBodyElement.res +9 -0
- package/src/html/HTMLButtonElement.res +98 -0
- package/src/html/HTMLDListElement.res +9 -0
- package/src/html/HTMLDataElement.res +14 -0
- package/src/html/HTMLDataListElement.res +14 -0
- package/src/html/HTMLDialogElement.res +40 -0
- package/src/html/HTMLDivElement.res +9 -0
- package/src/html/HTMLElement.res +108 -0
- package/src/html/HTMLEmbedElement.res +275 -0
- package/src/html/HTMLFieldSetElement.res +70 -0
- package/src/html/HTMLFormControlsCollection.res +21 -0
- package/src/html/HTMLFormElement.res +39 -0
- package/src/html/HTMLFrameSetElement.res +9 -0
- package/src/html/HTMLHRElement.res +9 -0
- package/src/html/HTMLHeadElement.res +256 -0
- package/src/html/HTMLHeadingElement.res +9 -0
- package/src/html/HTMLHtmlElement.res +9 -0
- package/src/html/HTMLIFrameElement.res +69 -0
- package/src/html/HTMLImageElement.res +349 -0
- package/src/html/HTMLInputElement.res +310 -0
- package/src/html/HTMLLIElement.res +9 -0
- package/src/html/HTMLLabelElement.res +25 -0
- package/src/html/HTMLLegendElement.res +14 -0
- package/src/html/HTMLLinkElement.res +69 -0
- package/src/html/HTMLMapElement.res +20 -0
- package/src/html/HTMLMenuElement.res +8 -0
- package/src/html/HTMLMetaElement.res +29 -0
- package/src/html/HTMLMeterElement.res +38 -0
- package/src/html/HTMLModElement.res +9 -0
- package/src/html/HTMLOListElement.res +24 -0
- package/src/html/HTMLObjectElement.res +89 -0
- package/src/html/HTMLOptGroupElement.res +19 -0
- package/src/html/HTMLOptionElement.res +49 -0
- package/src/html/HTMLOptionsCollection.res +35 -0
- package/src/html/HTMLOutputElement.res +73 -0
- package/src/html/HTMLParagraphElement.res +9 -0
- package/src/html/HTMLPictureElement.res +9 -0
- package/src/html/HTMLPreElement.res +9 -0
- package/src/html/HTMLProgressElement.res +29 -0
- package/src/html/HTMLQuoteElement.res +9 -0
- package/src/html/HTMLScriptElement.res +310 -0
- package/src/html/HTMLSelectElement.res +157 -0
- package/src/html/HTMLSlotElement.res +34 -0
- package/src/html/HTMLSourceElement.res +18 -0
- package/src/html/HTMLSpanElement.res +9 -0
- package/src/html/HTMLStyleElement.res +24 -0
- package/src/html/HTMLTableCaptionElement.res +9 -0
- package/src/html/HTMLTableCellElement.res +40 -0
- package/src/html/HTMLTableElement.res +100 -0
- package/src/html/HTMLTableRowElement.res +40 -0
- package/src/html/HTMLTableSectionElement.res +30 -0
- package/src/html/HTMLTemplateElement.res +31 -0
- package/src/html/HTMLTextAreaElement.res +177 -0
- package/src/html/HTMLTimeElement.res +14 -0
- package/src/html/HTMLTitleElement.res +15 -0
- package/src/html/HTMLUListElement.res +9 -0
- package/src/html/HTMLUnknownElement.res +9 -0
- package/src/media/BaseEncryptedMediaExtensions.res +97 -0
- package/src/media/DomHTMLMediaElement.res +206 -0
- package/src/media/EncryptedMediaExtensionsHTMLMediaElement.res +15 -0
- package/src/media/EncryptedMediaExtensionsTypes.res +43 -0
- package/src/media/HTMLAudioElement.res +9 -0
- package/src/media/HTMLTrackElement.res +14 -0
- package/src/media/HTMLVideoElement.res +78 -0
- package/src/media/MediaCapabilities.res +19 -0
- package/src/media/MediaCapabilitiesTypes.res +83 -0
- package/src/media/MediaCaptureAndStreamsTypes.res +197 -0
- package/src/media/MediaDeviceInfo.res +9 -0
- package/src/media/MediaDevices.res +40 -0
- package/src/media/MediaError.res +14 -0
- package/src/media/MediaKeySession.res +53 -0
- package/src/media/MediaKeyStatusMap.res +11 -0
- package/src/media/MediaKeySystemAccess.res +14 -0
- package/src/media/MediaKeys.res +35 -0
- package/src/media/MediaMetadata.res +10 -0
- package/src/media/MediaSession.res +25 -0
- package/src/media/MediaSessionTypes.res +85 -0
- package/src/media/MediaStream.res +89 -0
- package/src/media/MediaStreamTrack.res +51 -0
- package/src/media/PictureInPicture.res +7 -0
- package/src/media/PictureInPictureTypes.res +17 -0
- package/src/media/RemotePlayback.res +25 -0
- package/src/media/RemotePlaybackTypes.res +20 -0
- package/src/media/SpeechSynthesis.res +33 -0
- package/src/media/SpeechSynthesisUtterance.res +8 -0
- package/src/media/TextTrack.res +15 -0
- package/src/media/TextTrackCueList.res +9 -0
- package/src/media/TextTrackList.res +17 -0
- package/src/media/TimeRanges.res +29 -0
- package/src/media/VideoPlaybackQuality.res +18 -0
- package/src/media/WebSpeechTypes.res +83 -0
- package/src/media/WebVttTypes.res +123 -0
- package/src/messaging/ApplicationServerKey.res +2 -0
- package/src/messaging/ChannelMessagingTypes.res +12 -0
- package/src/messaging/CloseEvent.res +10 -0
- package/src/messaging/MessageEvent.res +43 -0
- package/src/messaging/MessagePort.res +38 -0
- package/src/messaging/Notification.res +46 -0
- package/src/messaging/NotificationTypes.res +107 -0
- package/src/messaging/PushEvent.res +3 -0
- package/src/messaging/PushManager.res +24 -0
- package/src/messaging/PushMessageData.res +15 -0
- package/src/messaging/PushSubscription.res +20 -0
- package/src/messaging/PushTypes.res +88 -0
- package/src/messaging/WebSocket.res +74 -0
- package/src/messaging/WebSocketsTypes.res +124 -0
- package/src/navigator/Clipboard.res +29 -0
- package/src/navigator/ClipboardItem.res +20 -0
- package/src/navigator/ClipboardTypes.res +31 -0
- package/src/navigator/CredentialManagementTypes.res +138 -0
- package/src/navigator/CredentialsContainer.res +33 -0
- package/src/navigator/Navigator.res +166 -0
- package/src/navigator/Permissions.res +10 -0
- package/src/navigator/PermissionsTypes.res +38 -0
- package/src/observers/IntersectionObserver.res +36 -0
- package/src/observers/IntersectionObserverRoot.res +23 -0
- package/src/observers/IntersectionObserverTypes.res +67 -0
- package/src/observers/MutationObserver.res +94 -0
- package/src/observers/ResizeObserver.res +30 -0
- package/src/observers/ResizeObserverTypes.res +56 -0
- package/src/performance/Performance.res +101 -0
- package/src/performance/PerformanceEntry.res +5 -0
- package/src/performance/PerformanceMark.res +16 -0
- package/src/performance/PerformanceTypes.res +86 -0
- package/src/storage/Cache.res +117 -0
- package/src/storage/CacheStorage.res +43 -0
- package/src/storage/CacheTypes.res +24 -0
- package/src/storage/IDBDatabase.res +54 -0
- package/src/storage/IDBFactory.res +34 -0
- package/src/storage/IDBIndex.res +83 -0
- package/src/storage/IDBObjectStore.res +183 -0
- package/src/storage/IDBTransaction.res +22 -0
- package/src/storage/IndexedDbTypes.res +213 -0
- package/src/storage/Storage.res +42 -0
- package/src/storage/StorageEvent.res +10 -0
- package/src/storage/StorageManager.res +24 -0
- package/src/storage/StorageTypes.res +11 -0
- package/src/storage/WebStorageTypes.res +57 -0
- package/src/svg/SVGElement.res +115 -0
- package/src/svg/SVGGraphicsElement.res +16 -0
- package/src/svg/SVGLength.res +9 -0
- package/src/ui-events/CompositionEvent.res +10 -0
- package/src/ui-events/DataTransfer.res +38 -0
- package/src/ui-events/DataTransferItem.res +21 -0
- package/src/ui-events/DataTransferItemList.res +34 -0
- package/src/ui-events/FocusEvent.res +10 -0
- package/src/ui-events/InputEvent.res +16 -0
- package/src/ui-events/KeyboardEvent.res +16 -0
- package/src/ui-events/MouseEvent.res +26 -0
- package/src/ui-events/PointerEvent.res +24 -0
- package/src/ui-events/Touch.res +5 -0
- package/src/ui-events/TouchEvent.res +10 -0
- package/src/ui-events/TouchList.res +5 -0
- package/src/ui-events/UIEvent.res +20 -0
- package/src/ui-events/UiEventsTypes.res +590 -0
- package/src/ui-events/WheelEvent.res +10 -0
- package/src/url/URL.res +38 -0
- package/src/url/URLSearchParams.res +104 -0
- package/src/url/UrlTypes.res +69 -0
- package/src/view-transitions/ViewTransition.res +5 -0
- package/src/view-transitions/ViewTransitionsTypes.res +22 -0
- package/src/web-audio/AnalyserNode.res +38 -0
- package/src/web-audio/AudioBuffer.res +33 -0
- package/src/web-audio/AudioBufferSourceNode.res +21 -0
- package/src/web-audio/AudioContext.res +59 -0
- package/src/web-audio/AudioDestinationNode.res +1 -0
- package/src/web-audio/AudioNode.res +76 -0
- package/src/web-audio/AudioParam.res +65 -0
- package/src/web-audio/AudioProcessingEvent.res +10 -0
- package/src/web-audio/AudioScheduledSourceNode.res +23 -0
- package/src/web-audio/AudioWorkletNode.res +11 -0
- package/src/web-audio/BaseAudioContext.res +141 -0
- package/src/web-audio/BiquadFilterNode.res +21 -0
- package/src/web-audio/ChannelMergerNode.res +10 -0
- package/src/web-audio/ChannelSplitterNode.res +10 -0
- package/src/web-audio/ConstantSourceNode.res +10 -0
- package/src/web-audio/ConvolverNode.res +10 -0
- package/src/web-audio/DelayNode.res +10 -0
- package/src/web-audio/DynamicsCompressorNode.res +10 -0
- package/src/web-audio/GainNode.res +10 -0
- package/src/web-audio/IIRFilterNode.res +21 -0
- package/src/web-audio/MediaElementAudioSourceNode.res +10 -0
- package/src/web-audio/MediaStreamAudioDestinationNode.res +10 -0
- package/src/web-audio/MediaStreamAudioSourceNode.res +10 -0
- package/src/web-audio/OfflineAudioCompletionEvent.res +10 -0
- package/src/web-audio/OfflineAudioContext.res +58 -0
- package/src/web-audio/OscillatorNode.res +17 -0
- package/src/web-audio/PannerNode.res +10 -0
- package/src/web-audio/PeriodicWave.res +8 -0
- package/src/web-audio/StereoPannerNode.res +10 -0
- package/src/web-audio/WaveShaperNode.res +10 -0
- package/src/web-audio/WebAudioTypes.res +1309 -0
- package/src/web-audio/Worklet.res +14 -0
- package/src/window/CustomElementRegistry.res +30 -0
- package/src/window/Document.res +470 -0
- package/src/window/DomGlobal.res +459 -0
- package/src/window/History.res +37 -0
- package/src/window/HistoryTypes.res +26 -0
- package/src/window/IdleDeadline.res +5 -0
- package/src/window/Location.res +108 -0
- package/src/window/VisualViewport.res +5 -0
- package/src/window/VisualViewportTypes.res +37 -0
- package/src/window/Window.res +556 -0
- package/src/window/XPathExpression.res +16 -0
- package/src/window/XPathResult.res +46 -0
- package/src/workers/Clients.res +39 -0
- package/src/workers/NavigationPreloadManager.res +26 -0
- package/src/workers/ServiceWorker.res +38 -0
- package/src/workers/ServiceWorkerContainer.res +34 -0
- package/src/workers/ServiceWorkerRegistration.res +32 -0
- package/src/workers/ServiceWorkerScope.res +12 -0
- package/src/workers/ServiceWorkerTypes.res +153 -0
- package/src/workers/SharedWorker.res +68 -0
- package/src/workers/SharedWorkerScope.res +29 -0
- package/src/workers/WebWorkersTypes.res +46 -0
- package/src/workers/Worker.res +48 -0
- package/src/workers/WorkerLocation.res +18 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver)
|
|
3
|
+
*/
|
|
4
|
+
@throws(JsExn) @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, DOMTree.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, DOMTree.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"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
external fromDocument: DOM.document => IntersectionObserverTypes.root = "%identity"
|
|
2
|
+
external fromElement: DOMTree.element => IntersectionObserverTypes.root = "%identity"
|
|
3
|
+
external fromNull: IntersectionObserverTypes.root = "null"
|
|
4
|
+
|
|
5
|
+
external toElement: IntersectionObserverTypes.root => DOMTree.element = "%identity"
|
|
6
|
+
external toDocument: IntersectionObserverTypes.root => DOM.document = "%identity"
|
|
7
|
+
|
|
8
|
+
type decoded =
|
|
9
|
+
| Element(DOMTree.element)
|
|
10
|
+
| Document(DOM.document)
|
|
11
|
+
| Null
|
|
12
|
+
|
|
13
|
+
let isDocument = (_: 't): bool => %raw(`param instanceof Document`)
|
|
14
|
+
|
|
15
|
+
let decode = (t: IntersectionObserverTypes.root): decoded => {
|
|
16
|
+
if Element.isInstanceOf(t) {
|
|
17
|
+
Element(t->toElement)
|
|
18
|
+
} else if isDocument(t) {
|
|
19
|
+
Document(t->toDocument)
|
|
20
|
+
} else {
|
|
21
|
+
Null
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
|
|
3
|
+
@editor.completeFrom(IntersectionObserverRoot)
|
|
4
|
+
type root
|
|
5
|
+
|
|
6
|
+
/**
|
|
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.
|
|
8
|
+
[See WebApiIntersectionObserver on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver)
|
|
9
|
+
*/
|
|
10
|
+
@editor.completeFrom(WebApiIntersectionObserver)
|
|
11
|
+
type intersectionObserver = private {
|
|
12
|
+
/**
|
|
13
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/root)
|
|
14
|
+
*/
|
|
15
|
+
root: Null.t<root>,
|
|
16
|
+
/**
|
|
17
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/rootMargin)
|
|
18
|
+
*/
|
|
19
|
+
rootMargin: string,
|
|
20
|
+
/**
|
|
21
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/thresholds)
|
|
22
|
+
*/
|
|
23
|
+
thresholds: array<float>,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
This Intersection Observer API interface describes the intersection between the target element and its root container at a specific moment of transition.
|
|
28
|
+
[See IntersectionObserverEntry on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry)
|
|
29
|
+
*/
|
|
30
|
+
type intersectionObserverEntry = {
|
|
31
|
+
/**
|
|
32
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/time)
|
|
33
|
+
*/
|
|
34
|
+
time: float,
|
|
35
|
+
/**
|
|
36
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/rootBounds)
|
|
37
|
+
*/
|
|
38
|
+
rootBounds: Null.t<DOM.domRectReadOnly>,
|
|
39
|
+
/**
|
|
40
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/boundingClientRect)
|
|
41
|
+
*/
|
|
42
|
+
boundingClientRect: DOM.domRectReadOnly,
|
|
43
|
+
/**
|
|
44
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/intersectionRect)
|
|
45
|
+
*/
|
|
46
|
+
intersectionRect: DOM.domRectReadOnly,
|
|
47
|
+
/**
|
|
48
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/isIntersecting)
|
|
49
|
+
*/
|
|
50
|
+
isIntersecting: bool,
|
|
51
|
+
/**
|
|
52
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/intersectionRatio)
|
|
53
|
+
*/
|
|
54
|
+
intersectionRatio: float,
|
|
55
|
+
/**
|
|
56
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserverEntry/target)
|
|
57
|
+
*/
|
|
58
|
+
target: DOMTree.element,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type intersectionObserverInit = {
|
|
62
|
+
mutable root?: Nullable.t<root>,
|
|
63
|
+
mutable rootMargin?: string,
|
|
64
|
+
mutable threshold?: array<float>,
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
type intersectionObserverCallback = (array<intersectionObserverEntry>, intersectionObserver) => unit
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Represents an individual DOM mutation.
|
|
3
|
+
[See MutationRecord on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord)
|
|
4
|
+
*/
|
|
5
|
+
type mutationRecord = {
|
|
6
|
+
/**
|
|
7
|
+
Returns "attributes" if it was an attribute mutation. "characterData" if it was a mutation to a CharacterData node. And "childList" if it was a mutation to the tree of nodes.
|
|
8
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/type)
|
|
9
|
+
*/
|
|
10
|
+
@as("type")
|
|
11
|
+
type_: string,
|
|
12
|
+
/**
|
|
13
|
+
Returns the node the mutation affected, depending on the type. For "attributes", it is the element whose attribute changed. For "characterData", it is the CharacterData node. For "childList", it is the node whose children changed.
|
|
14
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/target)
|
|
15
|
+
*/
|
|
16
|
+
target: DOMTree.node,
|
|
17
|
+
/**
|
|
18
|
+
Return the nodes added and removed respectively.
|
|
19
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/addedNodes)
|
|
20
|
+
*/
|
|
21
|
+
addedNodes: DOM.nodeList<DOMTree.node>,
|
|
22
|
+
/**
|
|
23
|
+
Return the nodes added and removed respectively.
|
|
24
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/removedNodes)
|
|
25
|
+
*/
|
|
26
|
+
removedNodes: DOM.nodeList<DOMTree.node>,
|
|
27
|
+
/**
|
|
28
|
+
Return the previous and next sibling respectively of the added or removed nodes, and null otherwise.
|
|
29
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/previousSibling)
|
|
30
|
+
*/
|
|
31
|
+
previousSibling: Null.t<DOMTree.node>,
|
|
32
|
+
/**
|
|
33
|
+
Return the previous and next sibling respectively of the added or removed nodes, and null otherwise.
|
|
34
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/nextSibling)
|
|
35
|
+
*/
|
|
36
|
+
nextSibling: Null.t<DOMTree.node>,
|
|
37
|
+
/**
|
|
38
|
+
Returns the local name of the changed attribute, and null otherwise.
|
|
39
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/attributeName)
|
|
40
|
+
*/
|
|
41
|
+
attributeName: Null.t<string>,
|
|
42
|
+
/**
|
|
43
|
+
Returns the namespace of the changed attribute, and null otherwise.
|
|
44
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/attributeNamespace)
|
|
45
|
+
*/
|
|
46
|
+
attributeNamespace: Null.t<string>,
|
|
47
|
+
/**
|
|
48
|
+
The return value depends on type. For "attributes", it is the value of the changed attribute before the change. For "characterData", it is the data of the changed node before the change. For "childList", it is null.
|
|
49
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationRecord/oldValue)
|
|
50
|
+
*/
|
|
51
|
+
oldValue: Null.t<string>,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
[See WebApiMutationObserver on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver)
|
|
56
|
+
*/
|
|
57
|
+
@editor.completeFrom(WebApiMutationObserver)
|
|
58
|
+
type t
|
|
59
|
+
|
|
60
|
+
type mutationObserverInit = {
|
|
61
|
+
mutable childList?: bool,
|
|
62
|
+
mutable attributes?: bool,
|
|
63
|
+
mutable characterData?: bool,
|
|
64
|
+
mutable subtree?: bool,
|
|
65
|
+
mutable attributeOldValue?: bool,
|
|
66
|
+
mutable characterDataOldValue?: bool,
|
|
67
|
+
mutable attributeFilter?: array<string>,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type mutationObserverCallback = (array<mutationRecord>, t) => unit
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver)
|
|
74
|
+
*/
|
|
75
|
+
@new
|
|
76
|
+
external make: mutationObserverCallback => t = "MutationObserver"
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/observe)
|
|
80
|
+
*/
|
|
81
|
+
@throws(JsExn) @send
|
|
82
|
+
external observe: (t, ~target: DOMTree.node, ~options: mutationObserverInit=?) => unit = "observe"
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/disconnect)
|
|
86
|
+
*/
|
|
87
|
+
@send
|
|
88
|
+
external disconnect: t => unit = "disconnect"
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MutationObserver/takeRecords)
|
|
92
|
+
*/
|
|
93
|
+
@send
|
|
94
|
+
external takeRecords: t => array<mutationRecord> = "takeRecords"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver)
|
|
3
|
+
*/
|
|
4
|
+
@new
|
|
5
|
+
external make: ResizeObserverTypes.resizeObserverCallback => ResizeObserverTypes.resizeObserver =
|
|
6
|
+
"ResizeObserver"
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver/observe)
|
|
10
|
+
*/
|
|
11
|
+
@send
|
|
12
|
+
external observe: (
|
|
13
|
+
ResizeObserverTypes.resizeObserver,
|
|
14
|
+
~target: DOMTree.element,
|
|
15
|
+
~options: ResizeObserverTypes.resizeObserverOptions=?,
|
|
16
|
+
) => unit = "observe"
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver/unobserve)
|
|
20
|
+
*/
|
|
21
|
+
@send
|
|
22
|
+
external unobserve: (ResizeObserverTypes.resizeObserver, DOMTree.element) => unit = "unobserve"
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver/disconnect)
|
|
26
|
+
*/
|
|
27
|
+
@send
|
|
28
|
+
external disconnect: ResizeObserverTypes.resizeObserver => unit = "disconnect"
|
|
29
|
+
|
|
30
|
+
module Types = ResizeObserverTypes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
|
|
3
|
+
type resizeObserverBoxOptions =
|
|
4
|
+
| @as("border-box") BorderBox
|
|
5
|
+
| @as("content-box") ContentBox
|
|
6
|
+
| @as("device-pixel-content-box") DevicePixelContentBox
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
[See ResizeObserverSize on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverSize)
|
|
10
|
+
*/
|
|
11
|
+
type resizeObserverSize = {
|
|
12
|
+
/**
|
|
13
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverSize/inlineSize)
|
|
14
|
+
*/
|
|
15
|
+
inlineSize: float,
|
|
16
|
+
/**
|
|
17
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverSize/blockSize)
|
|
18
|
+
*/
|
|
19
|
+
blockSize: float,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
[See ResizeObserverEntry on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry)
|
|
24
|
+
*/
|
|
25
|
+
type resizeObserverEntry = {
|
|
26
|
+
/**
|
|
27
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/target)
|
|
28
|
+
*/
|
|
29
|
+
target: DOMTree.element,
|
|
30
|
+
/**
|
|
31
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/contentRect)
|
|
32
|
+
*/
|
|
33
|
+
contentRect: DOM.domRectReadOnly,
|
|
34
|
+
/**
|
|
35
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/borderBoxSize)
|
|
36
|
+
*/
|
|
37
|
+
borderBoxSize: array<resizeObserverSize>,
|
|
38
|
+
/**
|
|
39
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/contentBoxSize)
|
|
40
|
+
*/
|
|
41
|
+
contentBoxSize: array<resizeObserverSize>,
|
|
42
|
+
/**
|
|
43
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/devicePixelContentBoxSize)
|
|
44
|
+
*/
|
|
45
|
+
devicePixelContentBoxSize: array<resizeObserverSize>,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
[See WebApiResizeObserver on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver)
|
|
50
|
+
*/
|
|
51
|
+
@editor.completeFrom(WebApiResizeObserver)
|
|
52
|
+
type resizeObserver = private {}
|
|
53
|
+
|
|
54
|
+
type resizeObserverOptions = {mutable box?: resizeObserverBoxOptions}
|
|
55
|
+
|
|
56
|
+
type resizeObserverCallback = array<resizeObserverEntry> => resizeObserver => unit
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
include EventTarget.Impl({type t = PerformanceTypes.performance})
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/now)
|
|
5
|
+
*/
|
|
6
|
+
@send
|
|
7
|
+
external now: PerformanceTypes.performance => float = "now"
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
11
|
+
*/
|
|
12
|
+
@send
|
|
13
|
+
external toJSON: PerformanceTypes.performance => Dict.t<string> = "toJSON"
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/getEntries)
|
|
17
|
+
*/
|
|
18
|
+
@send
|
|
19
|
+
external getEntries: PerformanceTypes.performance => PerformanceTypes.performanceEntryList =
|
|
20
|
+
"getEntries"
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType)
|
|
24
|
+
*/
|
|
25
|
+
@send
|
|
26
|
+
external getEntriesByType: (
|
|
27
|
+
PerformanceTypes.performance,
|
|
28
|
+
string,
|
|
29
|
+
) => PerformanceTypes.performanceEntryList = "getEntriesByType"
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName)
|
|
33
|
+
*/
|
|
34
|
+
@send
|
|
35
|
+
external getEntriesByName: (
|
|
36
|
+
PerformanceTypes.performance,
|
|
37
|
+
~name: string,
|
|
38
|
+
~type_: string=?,
|
|
39
|
+
) => PerformanceTypes.performanceEntryList = "getEntriesByName"
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings)
|
|
43
|
+
*/
|
|
44
|
+
@send
|
|
45
|
+
external clearResourceTimings: PerformanceTypes.performance => unit = "clearResourceTimings"
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
|
|
49
|
+
*/
|
|
50
|
+
@send
|
|
51
|
+
external setResourceTimingBufferSize: (PerformanceTypes.performance, int) => unit =
|
|
52
|
+
"setResourceTimingBufferSize"
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/mark)
|
|
56
|
+
*/
|
|
57
|
+
@throws(JsExn) @send
|
|
58
|
+
external mark: (
|
|
59
|
+
PerformanceTypes.performance,
|
|
60
|
+
~markName: string,
|
|
61
|
+
~markOptions: PerformanceTypes.performanceMarkOptions=?,
|
|
62
|
+
) => PerformanceTypes.performanceMark = "mark"
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks)
|
|
66
|
+
*/
|
|
67
|
+
@send
|
|
68
|
+
external clearMarks: (PerformanceTypes.performance, ~markName: string=?) => unit = "clearMarks"
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/measure)
|
|
72
|
+
*/
|
|
73
|
+
@throws(JsExn) @send
|
|
74
|
+
external measure: (
|
|
75
|
+
PerformanceTypes.performance,
|
|
76
|
+
~measureName: string,
|
|
77
|
+
~startOrMeasureOptions: string=?,
|
|
78
|
+
~endMark: string=?,
|
|
79
|
+
) => PerformanceTypes.performanceMeasure = "measure"
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/measure)
|
|
83
|
+
*/
|
|
84
|
+
@throws(JsExn) @send
|
|
85
|
+
external measure2: (
|
|
86
|
+
PerformanceTypes.performance,
|
|
87
|
+
~measureName: string,
|
|
88
|
+
~startOrMeasureOptions: PerformanceTypes.performanceMeasureOptions=?,
|
|
89
|
+
~endMark: string=?,
|
|
90
|
+
) => PerformanceTypes.performanceMeasure = "measure"
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures)
|
|
94
|
+
*/
|
|
95
|
+
@send
|
|
96
|
+
external clearMeasures: (PerformanceTypes.performance, ~measureName: string=?) => unit =
|
|
97
|
+
"clearMeasures"
|
|
98
|
+
|
|
99
|
+
module PerformanceEntry = PerformanceEntry
|
|
100
|
+
module PerformanceMark = PerformanceMark
|
|
101
|
+
module Types = PerformanceTypes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3
|
+
*/
|
|
4
|
+
@throws(JsExn) @new
|
|
5
|
+
external make: (
|
|
6
|
+
~markName: string,
|
|
7
|
+
~markOptions: PerformanceTypes.performanceMarkOptions=?,
|
|
8
|
+
) => PerformanceTypes.performanceMark = "PerformanceMark"
|
|
9
|
+
|
|
10
|
+
external asPerformanceEntry: PerformanceTypes.performanceMark => PerformanceTypes.performanceEntry =
|
|
11
|
+
"%identity"
|
|
12
|
+
/**
|
|
13
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
|
|
14
|
+
*/
|
|
15
|
+
@send
|
|
16
|
+
external toJSON: PerformanceTypes.performanceMark => Dict.t<string> = "toJSON"
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@@warning("-30")
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
[See EventCounts on MDN](https://developer.mozilla.org/docs/Web/API/EventCounts)
|
|
5
|
+
*/
|
|
6
|
+
type eventCounts = {}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the WebApiPerformance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.
|
|
10
|
+
[See WebApiPerformance on MDN](https://developer.mozilla.org/docs/Web/API/Performance)
|
|
11
|
+
*/
|
|
12
|
+
@editor.completeFrom(WebApiPerformance)
|
|
13
|
+
type performance = private {
|
|
14
|
+
...DOM.eventTarget,
|
|
15
|
+
/**
|
|
16
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin)
|
|
17
|
+
*/
|
|
18
|
+
timeOrigin: float,
|
|
19
|
+
/**
|
|
20
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Performance/eventCounts)
|
|
21
|
+
*/
|
|
22
|
+
eventCounts: eventCounts,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. WebApiPerformance entries are also created in indirect ways such as loading a resource (such as an image).
|
|
27
|
+
[See PerformanceEntry on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
28
|
+
*/
|
|
29
|
+
@editor.completeFrom(PerformanceEntry)
|
|
30
|
+
type performanceEntry = private {
|
|
31
|
+
/**
|
|
32
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name)
|
|
33
|
+
*/
|
|
34
|
+
name: string,
|
|
35
|
+
/**
|
|
36
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType)
|
|
37
|
+
*/
|
|
38
|
+
entryType: string,
|
|
39
|
+
/**
|
|
40
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime)
|
|
41
|
+
*/
|
|
42
|
+
startTime: float,
|
|
43
|
+
/**
|
|
44
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration)
|
|
45
|
+
*/
|
|
46
|
+
duration: float,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline.
|
|
51
|
+
[See PerformanceMark on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
52
|
+
*/
|
|
53
|
+
@editor.completeFrom(PerformanceMark)
|
|
54
|
+
type performanceMark = private {
|
|
55
|
+
...performanceEntry,
|
|
56
|
+
/**
|
|
57
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
|
|
58
|
+
*/
|
|
59
|
+
detail: JSON.t,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.
|
|
64
|
+
[See PerformanceMeasure on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
65
|
+
*/
|
|
66
|
+
type performanceMeasure = {
|
|
67
|
+
...performanceEntry,
|
|
68
|
+
/**
|
|
69
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
|
|
70
|
+
*/
|
|
71
|
+
detail: JSON.t,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type performanceEntryList = unknown
|
|
75
|
+
|
|
76
|
+
type performanceMarkOptions = {
|
|
77
|
+
mutable detail?: JSON.t,
|
|
78
|
+
mutable startTime?: float,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
type performanceMeasureOptions = {
|
|
82
|
+
mutable detail?: JSON.t,
|
|
83
|
+
mutable start?: unknown,
|
|
84
|
+
mutable duration?: float,
|
|
85
|
+
mutable end?: unknown,
|
|
86
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match)
|
|
3
|
+
*/
|
|
4
|
+
@send
|
|
5
|
+
external match: (
|
|
6
|
+
CacheTypes.cache,
|
|
7
|
+
~request: FetchTypes.request,
|
|
8
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
9
|
+
) => promise<option<FetchTypes.response>> = "match"
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match)
|
|
13
|
+
*/
|
|
14
|
+
@send
|
|
15
|
+
external match2: (
|
|
16
|
+
CacheTypes.cache,
|
|
17
|
+
~request: string,
|
|
18
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
19
|
+
) => promise<option<FetchTypes.response>> = "match"
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll)
|
|
23
|
+
*/
|
|
24
|
+
@send
|
|
25
|
+
external matchAll: (
|
|
26
|
+
CacheTypes.cache,
|
|
27
|
+
~request: FetchTypes.request=?,
|
|
28
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
29
|
+
) => promise<array<FetchTypes.response>> = "matchAll"
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll)
|
|
33
|
+
*/
|
|
34
|
+
@send
|
|
35
|
+
external matchAll2: (
|
|
36
|
+
CacheTypes.cache,
|
|
37
|
+
~request: string=?,
|
|
38
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
39
|
+
) => promise<array<FetchTypes.response>> = "matchAll"
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add)
|
|
43
|
+
*/
|
|
44
|
+
@send
|
|
45
|
+
external add: (CacheTypes.cache, FetchTypes.request) => promise<unit> = "add"
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add)
|
|
49
|
+
*/
|
|
50
|
+
@send
|
|
51
|
+
external add2: (CacheTypes.cache, string) => promise<unit> = "add"
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
|
|
55
|
+
*/
|
|
56
|
+
@send
|
|
57
|
+
external addAll: (CacheTypes.cache, array<FetchTypes.requestInfo>) => promise<unit> = "addAll"
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put)
|
|
61
|
+
*/
|
|
62
|
+
@send
|
|
63
|
+
external put: (
|
|
64
|
+
CacheTypes.cache,
|
|
65
|
+
~request: FetchTypes.request,
|
|
66
|
+
~response: FetchTypes.response,
|
|
67
|
+
) => promise<unit> = "put"
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put)
|
|
71
|
+
*/
|
|
72
|
+
@send
|
|
73
|
+
external put2: (
|
|
74
|
+
CacheTypes.cache,
|
|
75
|
+
~request: string,
|
|
76
|
+
~response: FetchTypes.response,
|
|
77
|
+
) => promise<unit> = "put"
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete)
|
|
81
|
+
*/
|
|
82
|
+
@send
|
|
83
|
+
external delete: (
|
|
84
|
+
CacheTypes.cache,
|
|
85
|
+
~request: FetchTypes.request,
|
|
86
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
87
|
+
) => promise<bool> = "delete"
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete)
|
|
91
|
+
*/
|
|
92
|
+
@send
|
|
93
|
+
external delete2: (
|
|
94
|
+
CacheTypes.cache,
|
|
95
|
+
~request: string,
|
|
96
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
97
|
+
) => promise<bool> = "delete"
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/keys)
|
|
101
|
+
*/
|
|
102
|
+
@send
|
|
103
|
+
external keys: (
|
|
104
|
+
CacheTypes.cache,
|
|
105
|
+
~request: FetchTypes.request=?,
|
|
106
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
107
|
+
) => promise<array<FetchTypes.request>> = "keys"
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/keys)
|
|
111
|
+
*/
|
|
112
|
+
@send
|
|
113
|
+
external keys2: (
|
|
114
|
+
CacheTypes.cache,
|
|
115
|
+
~request: string=?,
|
|
116
|
+
~options: CacheTypes.cacheQueryOptions=?,
|
|
117
|
+
) => promise<array<FetchTypes.request>> = "keys"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match)
|
|
3
|
+
*/
|
|
4
|
+
@send
|
|
5
|
+
external match: (
|
|
6
|
+
CacheTypes.cacheStorage,
|
|
7
|
+
~request: FetchTypes.request,
|
|
8
|
+
~options: CacheTypes.multiCacheQueryOptions=?,
|
|
9
|
+
) => promise<option<FetchTypes.response>> = "match"
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match)
|
|
13
|
+
*/
|
|
14
|
+
@send
|
|
15
|
+
external match2: (
|
|
16
|
+
CacheTypes.cacheStorage,
|
|
17
|
+
~request: string,
|
|
18
|
+
~options: CacheTypes.multiCacheQueryOptions=?,
|
|
19
|
+
) => promise<option<FetchTypes.response>> = "match"
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/has)
|
|
23
|
+
*/
|
|
24
|
+
@send
|
|
25
|
+
external has: (CacheTypes.cacheStorage, string) => promise<bool> = "has"
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
29
|
+
*/
|
|
30
|
+
@send
|
|
31
|
+
external open_: (CacheTypes.cacheStorage, string) => promise<CacheTypes.cache> = "open"
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/delete)
|
|
35
|
+
*/
|
|
36
|
+
@send
|
|
37
|
+
external delete: (CacheTypes.cacheStorage, string) => promise<bool> = "delete"
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/keys)
|
|
41
|
+
*/
|
|
42
|
+
@send
|
|
43
|
+
external keys: CacheTypes.cacheStorage => promise<array<string>> = "keys"
|