From 18d9d553201d575fa8e194d3370298b556b28747 Mon Sep 17 00:00:00 2001 From: Andrew Herron Date: Sun, 31 Oct 2021 21:18:05 +1000 Subject: [PATCH] Enabled warning 105. Converted all externals to explicit using the brilliant https://comby.dev --- bsconfig.json | 2 +- src/Webapi.res | 5 +- .../Canvas/Webapi__Canvas__Canvas2d.res | 98 ++++--- .../Dom/Webapi__Dom__AnimationEvent.res | 6 +- src/Webapi/Dom/Webapi__Dom__Attr.res | 14 +- .../Dom/Webapi__Dom__BeforeUnloadEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__CharacterData.res | 14 +- src/Webapi/Dom/Webapi__Dom__ChildNode.res | 2 +- .../Dom/Webapi__Dom__ClipboardEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__CloseEvent.res | 6 +- .../Dom/Webapi__Dom__CompositionEvent.res | 2 +- .../Dom/Webapi__Dom__CssStyleDeclaration.res | 262 +++++++++--------- src/Webapi/Dom/Webapi__Dom__Document.res | 71 +++-- src/Webapi/Dom/Webapi__Dom__DocumentType.res | 6 +- .../Dom/Webapi__Dom__DomImplementation.res | 9 +- src/Webapi/Dom/Webapi__Dom__DomRect.res | 16 +- src/Webapi/Dom/Webapi__Dom__DomTokenList.res | 20 +- src/Webapi/Dom/Webapi__Dom__DragEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__Element.res | 100 ++++--- src/Webapi/Dom/Webapi__Dom__ErrorEvent.res | 10 +- src/Webapi/Dom/Webapi__Dom__Event.res | 24 +- src/Webapi/Dom/Webapi__Dom__EventTarget.res | 6 +- src/Webapi/Dom/Webapi__Dom__FocusEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__History.res | 16 +- .../Dom/Webapi__Dom__HtmlCollection.res | 6 +- src/Webapi/Dom/Webapi__Dom__HtmlDocument.res | 64 ++--- src/Webapi/Dom/Webapi__Dom__HtmlElement.res | 74 ++--- .../Dom/Webapi__Dom__HtmlFormElement.res | 30 +- .../Dom/Webapi__Dom__HtmlImageElement.res | 32 +-- .../Dom/Webapi__Dom__HtmlInputElement.res | 96 +++---- .../Webapi__Dom__IdbVersionChangeEvent.res | 4 +- src/Webapi/Dom/Webapi__Dom__Image.res | 6 +- src/Webapi/Dom/Webapi__Dom__InputEvent.res | 4 +- src/Webapi/Dom/Webapi__Dom__KeyboardEvent.res | 22 +- src/Webapi/Dom/Webapi__Dom__Location.res | 30 +- src/Webapi/Dom/Webapi__Dom__MouseEvent.res | 42 +-- .../Dom/Webapi__Dom__MutationObserver.res | 6 +- .../Dom/Webapi__Dom__MutationRecord.res | 16 +- src/Webapi/Dom/Webapi__Dom__NamedNodeMap.res | 16 +- src/Webapi/Dom/Webapi__Dom__Node.res | 58 ++-- src/Webapi/Dom/Webapi__Dom__NodeIterator.res | 16 +- src/Webapi/Dom/Webapi__Dom__NodeList.res | 6 +- .../Webapi__Dom__NonDocumentTypeChildNode.res | 4 +- .../Dom/Webapi__Dom__NonElementParentNode.res | 2 +- .../Dom/Webapi__Dom__PageTransitionEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__ParentNode.res | 12 +- src/Webapi/Dom/Webapi__Dom__PointerEvent.res | 16 +- src/Webapi/Dom/Webapi__Dom__PopStateEvent.res | 2 +- .../Webapi__Dom__ProcessingInstruction.res | 2 +- src/Webapi/Dom/Webapi__Dom__ProgressEvent.res | 6 +- src/Webapi/Dom/Webapi__Dom__Range.res | 62 ++--- src/Webapi/Dom/Webapi__Dom__RelatedEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__Selection.res | 38 +-- src/Webapi/Dom/Webapi__Dom__ShadowRoot.res | 4 +- src/Webapi/Dom/Webapi__Dom__Slotable.res | 2 +- src/Webapi/Dom/Webapi__Dom__StorageEvent.res | 10 +- src/Webapi/Dom/Webapi__Dom__SvgZoomEvent.res | 10 +- src/Webapi/Dom/Webapi__Dom__Text.res | 4 +- src/Webapi/Dom/Webapi__Dom__TimeEvent.res | 4 +- src/Webapi/Dom/Webapi__Dom__TouchEvent.res | 14 +- src/Webapi/Dom/Webapi__Dom__TrackEvent.res | 2 +- .../Dom/Webapi__Dom__TransitionEvent.res | 6 +- src/Webapi/Dom/Webapi__Dom__TreeWalker.res | 24 +- src/Webapi/Dom/Webapi__Dom__Types.res | 1 - src/Webapi/Dom/Webapi__Dom__UiEvent.res | 4 +- src/Webapi/Dom/Webapi__Dom__ValidityState.res | 22 +- .../Dom/Webapi__Dom__WebGlContextEvent.res | 2 +- src/Webapi/Dom/Webapi__Dom__WheelEvent.res | 8 +- src/Webapi/Dom/Webapi__Dom__Window.res | 121 ++++---- ...i__ResizeObserver__ResizeObserverEntry.res | 4 +- src/Webapi/Webapi__Base64.res | 4 +- src/Webapi/Webapi__Blob.res | 10 +- src/Webapi/Webapi__Fetch.res | 2 +- src/Webapi/Webapi__File.res | 6 +- src/Webapi/Webapi__Performance.res | 2 +- src/Webapi/Webapi__ReadableStream.res | 16 +- src/Webapi/Webapi__ResizeObserver.res | 6 +- src/Webapi/Webapi__Url.res | 56 ++-- 78 files changed, 850 insertions(+), 867 deletions(-) diff --git a/bsconfig.json b/bsconfig.json index 7915223a..6ddfe88c 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -17,7 +17,7 @@ } ], "warnings": { - "number": "+A-105", + "number": "+A", "error": "+A" }, "bs-dev-dependencies": [ diff --git a/src/Webapi.res b/src/Webapi.res index 49c30b6b..5450397e 100644 --- a/src/Webapi.res +++ b/src/Webapi.res @@ -10,7 +10,6 @@ module Iterator = Webapi__Iterator module Performance = Webapi__Performance -/** @since 0.19.0 */ module ReadableStream = Webapi__ReadableStream module IntersectionObserver = Webapi__IntersectionObserver @@ -20,7 +19,7 @@ module WebSocket = Webapi__WebSocket type rafId -@val external requestAnimationFrame: (float => unit) => unit = "" +@val external requestAnimationFrame: (float => unit) => unit = "requestAnimationFrame" @val external requestCancellableAnimationFrame: (float => unit) => rafId = "requestAnimationFrame" -@val external cancelAnimationFrame: rafId => unit = "" +@val external cancelAnimationFrame: rafId => unit = "cancelAnimationFrame" diff --git a/src/Webapi/Canvas/Webapi__Canvas__Canvas2d.res b/src/Webapi/Canvas/Webapi__Canvas__Canvas2d.res index d5c41d2c..4a7f5eef 100644 --- a/src/Webapi/Canvas/Webapi__Canvas__Canvas2d.res +++ b/src/Webapi/Canvas/Webapi__Canvas__Canvas2d.res @@ -78,13 +78,13 @@ type rec style<_> = | Pattern: style /* 2d Canvas API, following https://simon.html5.org/dump/html5-canvas-cheat-sheet.html */ -@send external save: t => unit = "" -@send external restore: t => unit = "" +@send external save: t => unit = "save" +@send external restore: t => unit = "restore" /* Transformation */ -@send external scale: (t, ~x: float, ~y: float) => unit = "" -@send external rotate: (t, float) => unit = "" -@send external translate: (t, ~x: float, ~y: float) => unit = "" +@send external scale: (t, ~x: float, ~y: float) => unit = "scale" +@send external rotate: (t, float) => unit = "rotate" +@send external translate: (t, ~x: float, ~y: float) => unit = "translate" @send external transform: ( t, @@ -94,7 +94,7 @@ external transform: ( ~m22: float, ~dx: float, ~dy: float, -) => unit = "" +) => unit = "transform" @send external setTransform: ( t, @@ -104,17 +104,17 @@ external setTransform: ( ~m22: float, ~dx: float, ~dy: float, -) => unit = "" +) => unit = "setTransform" /* Compositing */ -@set external globalAlpha: (t, float) => unit = "" -@set external globalCompositeOperation: (t, Composite.t) => unit = "" +@set external globalAlpha: (t, float) => unit = "globalAlpha" +@set external globalCompositeOperation: (t, Composite.t) => unit = "globalCompositeOperation" /* Line Styles */ -@set external lineWidth: (t, float) => unit = "" -@set external lineCap: (t, LineCap.t) => unit = "" -@set external lineJoin: (t, LineJoin.t) => unit = "" -@set external miterLimit: (t, float) => unit = "" +@set external lineWidth: (t, float) => unit = "lineWidth" +@set external lineCap: (t, LineCap.t) => unit = "lineCap" +@set external lineJoin: (t, LineJoin.t) => unit = "lineJoin" +@set external miterLimit: (t, float) => unit = "miterLimit" /* Colors, Styles, and Shadows */ @set external setFillStyle: (t, @ignore style<'a>, 'a) => unit = "fillStyle" @@ -145,21 +145,21 @@ let reifyStyle = (type a, x: 'a): (style, a) => { ) } -@get external fillStyle: t => 'a = "" -@get external strokeStyle: t => 'a = "" +@get external fillStyle: t => 'a = "fillStyle" +@get external strokeStyle: t => 'a = "strokeStyle" let fillStyle = (ctx: t) => ctx->fillStyle->reifyStyle let strokeStyle = (ctx: t) => ctx->strokeStyle->reifyStyle -@set external shadowOffsetX: (t, float) => unit = "" -@set external shadowOffsetY: (t, float) => unit = "" -@set external shadowBlur: (t, float) => unit = "" -@set external shadowColor: (t, string) => unit = "" +@set external shadowOffsetX: (t, float) => unit = "shadowOffsetX" +@set external shadowOffsetY: (t, float) => unit = "shadowOffsetY" +@set external shadowBlur: (t, float) => unit = "shadowBlur" +@set external shadowColor: (t, string) => unit = "shadowColor" /* Gradients */ @send -external createLinearGradient: (t, ~x0: float, ~y0: float, ~x1: float, ~y1: float) => gradient = "" +external createLinearGradient: (t, ~x0: float, ~y0: float, ~x1: float, ~y1: float) => gradient = "createLinearGradient" @send external createRadialGradient: ( t, @@ -169,8 +169,8 @@ external createRadialGradient: ( ~y1: float, ~r0: float, ~r1: float, -) => gradient = "" -@send external addColorStop: (gradient, float, string) => unit = "" +) => gradient = "createRadialGradient" +@send external addColorStop: (gradient, float, string) => unit = "addColorStop" @val external createPattern: ( t, @@ -182,17 +182,17 @@ external createPattern: ( | @as("repeat-y") #repeatY | @as("no-repeat") #noRepeat ], -) => pattern = "" +) => pattern = "createPattern" /* Paths */ -@send external beginPath: t => unit = "" -@send external closePath: t => unit = "" -@send external fill: t => unit = "" -@send external stroke: t => unit = "" -@send external clip: t => unit = "" -@send external moveTo: (t, ~x: float, ~y: float) => unit = "" -@send external lineTo: (t, ~x: float, ~y: float) => unit = "" -@send external quadraticCurveTo: (t, ~cp1x: float, ~cp1y: float, ~x: float, ~y: float) => unit = "" +@send external beginPath: t => unit = "beginPath" +@send external closePath: t => unit = "closePath" +@send external fill: t => unit = "fill" +@send external stroke: t => unit = "stroke" +@send external clip: t => unit = "clip" +@send external moveTo: (t, ~x: float, ~y: float) => unit = "moveTo" +@send external lineTo: (t, ~x: float, ~y: float) => unit = "lineTo" +@send external quadraticCurveTo: (t, ~cp1x: float, ~cp1y: float, ~x: float, ~y: float) => unit = "quadraticCurveTo" @send external bezierCurveTo: ( t, @@ -202,8 +202,8 @@ external bezierCurveTo: ( ~cp2y: float, ~x: float, ~y: float, -) => unit = "" -@send external arcTo: (t, ~x1: float, ~y1: float, ~x2: float, ~y2: float, ~r: float) => unit = "" +) => unit = "bezierCurveTo" +@send external arcTo: (t, ~x1: float, ~y1: float, ~x2: float, ~y2: float, ~r: float) => unit = "arcTo" @send external arc: ( t, @@ -213,26 +213,25 @@ external arc: ( ~startAngle: float, ~endAngle: float, ~anticw: bool, -) => unit = "" -@send external rect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "" -@send external isPointInPath: (t, ~x: float, ~y: float) => bool = "" +) => unit = "arc" +@send external rect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "rect" +@send external isPointInPath: (t, ~x: float, ~y: float) => bool = "isPointInPath" /* Text */ -@set external font: (t, string) => unit = "" -@set external textAlign: (t, string) => unit = "" -@set external textBaseline: (t, string) => unit = "" +@set external font: (t, string) => unit = "font" +@set external textAlign: (t, string) => unit = "textAlign" +@set external textBaseline: (t, string) => unit = "textBaseline" @send -external fillText: (t, string, ~x: float, ~y: float, ~maxWidth: float=?, @ignore unit) => unit = "" +external fillText: (t, string, ~x: float, ~y: float, ~maxWidth: float=?, @ignore unit) => unit = "fillText" @send -external strokeText: (t, string, ~x: float, ~y: float, ~maxWidth: float=?, @ignore unit) => unit = - "" -@send external measureText: (t, string) => measureText = "" -@get external width: measureText => float = "" +external strokeText: (t, string, ~x: float, ~y: float, ~maxWidth: float=?, @ignore unit) => unit = "strokeText" +@send external measureText: (t, string) => measureText = "measureText" +@get external width: measureText => float = "width" /* Rectangles */ -@send external fillRect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "" -@send external strokeRect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "" -@send external clearRect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "" +@send external fillRect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "fillRect" +@send external strokeRect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "strokeRect" +@send external clearRect: (t, ~x: float, ~y: float, ~w: float, ~h: float) => unit = "clearRect" @send external createImageDataCoords: (t, ~width: float, ~height: float) => Webapi__Dom__Image.t = @@ -242,11 +241,10 @@ external createImageDataFromImage: (t, Webapi__Dom__Image.t) => Webapi__Dom__Ima "createImageData" @send -external getImageData: (t, ~sx: float, ~sy: float, ~sw: float, ~sh: float) => Webapi__Dom__Image.t = - "" +external getImageData: (t, ~sx: float, ~sy: float, ~sw: float, ~sh: float) => Webapi__Dom__Image.t = "getImageData" @send -external putImageData: (t, ~imageData: Webapi__Dom__Image.t, ~dx: float, ~dy: float) => unit = "" +external putImageData: (t, ~imageData: Webapi__Dom__Image.t, ~dx: float, ~dy: float) => unit = "putImageData" @send external putImageDataWithDirtyRect: ( diff --git a/src/Webapi/Dom/Webapi__Dom__AnimationEvent.res b/src/Webapi/Dom/Webapi__Dom__AnimationEvent.res index 3ab50b83..b5957d89 100644 --- a/src/Webapi/Dom/Webapi__Dom__AnimationEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__AnimationEvent.res @@ -7,6 +7,6 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "AnimationEvent" @new external makeWithOptions: (string, {..}) => t = "AnimationEvent" -@get external animationName: t => string = "" -@get external elapsedTime: t => float = "" -@get external pseudoElement: t => string /* enum-ish */ = "" +@get external animationName: t => string = "animationName" +@get external elapsedTime: t => float = "elapsedTime" +@get external pseudoElement: t => string = "pseudoElement" diff --git a/src/Webapi/Dom/Webapi__Dom__Attr.res b/src/Webapi/Dom/Webapi__Dom__Attr.res index c58aac53..27149cb7 100644 --- a/src/Webapi/Dom/Webapi__Dom__Attr.res +++ b/src/Webapi/Dom/Webapi__Dom__Attr.res @@ -7,10 +7,10 @@ include Webapi__Dom__EventTarget.Impl({ type t = t }) -@get external namespaceURI: t => string = "" -@get external prefix: t => string = "" -@get external localName: t => string = "" -@get external name: t => string = "" -@get external value: t => string = "" -@get @return(nullable) external ownerElement: t => option = "" -@get external specified: t => bool = "" /* useless; always returns true (exact wording from spec) */ +@get external namespaceURI: t => string = "namespaceURI" +@get external prefix: t => string = "prefix" +@get external localName: t => string = "localName" +@get external name: t => string = "name" +@get external value: t => string = "value" +@get @return(nullable) external ownerElement: t => option = "ownerElement" +@get external specified: t => bool = "specified" /* useless; always returns true (exact wording from spec) */ diff --git a/src/Webapi/Dom/Webapi__Dom__BeforeUnloadEvent.res b/src/Webapi/Dom/Webapi__Dom__BeforeUnloadEvent.res index 3975ece5..a7a08aa0 100644 --- a/src/Webapi/Dom/Webapi__Dom__BeforeUnloadEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__BeforeUnloadEvent.res @@ -7,4 +7,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "BeforeUnloadEvent" @new external makeWithOptions: (string, {..}) => t = "BeforeUnloadEvent" -@get external returnValue: t => string = "" +@get external returnValue: t => string = "returnValue" diff --git a/src/Webapi/Dom/Webapi__Dom__CharacterData.res b/src/Webapi/Dom/Webapi__Dom__CharacterData.res index b89a168f..57c1a566 100644 --- a/src/Webapi/Dom/Webapi__Dom__CharacterData.res +++ b/src/Webapi/Dom/Webapi__Dom__CharacterData.res @@ -3,14 +3,14 @@ module Impl = ( type t }, ) => { - @get external data: T.t => string = "" - @get external length: T.t => int = "" + @get external data: T.t => string = "data" + @get external length: T.t => int = "length" - @send external substringData: (T.t, ~offset: int, ~count: int) => string = "" - @send external appendData: (T.t, string) => unit = "" - @send external insertData: (T.t, ~offset: int, string) => unit = "" - @send external deleteData: (T.t, ~offset: int, ~count: int) => unit = "" - @send external replaceData: (T.t, ~offset: int, ~count: int, string) => unit = "" + @send external substringData: (T.t, ~offset: int, ~count: int) => string = "substringData" + @send external appendData: (T.t, string) => unit = "appendData" + @send external insertData: (T.t, ~offset: int, string) => unit = "insertData" + @send external deleteData: (T.t, ~offset: int, ~count: int) => unit = "deleteData" + @send external replaceData: (T.t, ~offset: int, ~count: int, string) => unit = "replaceData" } type t = Dom.characterData diff --git a/src/Webapi/Dom/Webapi__Dom__ChildNode.res b/src/Webapi/Dom/Webapi__Dom__ChildNode.res index 06ae8889..f1332621 100644 --- a/src/Webapi/Dom/Webapi__Dom__ChildNode.res +++ b/src/Webapi/Dom/Webapi__Dom__ChildNode.res @@ -4,5 +4,5 @@ module Impl = ( type t }, ) => { - @send external remove: T.t => unit = "" + @send external remove: T.t => unit = "remove" } diff --git a/src/Webapi/Dom/Webapi__Dom__ClipboardEvent.res b/src/Webapi/Dom/Webapi__Dom__ClipboardEvent.res index 59305b5f..f60b53cb 100644 --- a/src/Webapi/Dom/Webapi__Dom__ClipboardEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__ClipboardEvent.res @@ -7,4 +7,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "ClipboardEvent" @new external makeWithOptions: (string, {..}) => t = "ClipboardEvent" -@get external clipboardData: t => Dom.dataTransfer = "" +@get external clipboardData: t => Dom.dataTransfer = "clipboardData" diff --git a/src/Webapi/Dom/Webapi__Dom__CloseEvent.res b/src/Webapi/Dom/Webapi__Dom__CloseEvent.res index 7fe1d600..785ee71f 100644 --- a/src/Webapi/Dom/Webapi__Dom__CloseEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__CloseEvent.res @@ -7,6 +7,6 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "CloseEvent" @new external makeWithOptions: (string, {..}) => t = "CloseEvent" -@get external wasClean: t => bool = "" -@get external code: t => int = "" -@get external reason: t => string = "" +@get external wasClean: t => bool = "wasClean" +@get external code: t => int = "code" +@get external reason: t => string = "reason" diff --git a/src/Webapi/Dom/Webapi__Dom__CompositionEvent.res b/src/Webapi/Dom/Webapi__Dom__CompositionEvent.res index 4e55c38d..4ca10394 100644 --- a/src/Webapi/Dom/Webapi__Dom__CompositionEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__CompositionEvent.res @@ -10,4 +10,4 @@ include Webapi__Dom__UiEvent.Impl({ @new external make: string => t = "CompositionEvent" @new external makeWithOptions: (string, {..}) => t = "CompositionEvent" -@get external data: t => string = "" +@get external data: t => string = "data" diff --git a/src/Webapi/Dom/Webapi__Dom__CssStyleDeclaration.res b/src/Webapi/Dom/Webapi__Dom__CssStyleDeclaration.res index 183aba7f..cc617c35 100644 --- a/src/Webapi/Dom/Webapi__Dom__CssStyleDeclaration.res +++ b/src/Webapi/Dom/Webapi__Dom__CssStyleDeclaration.res @@ -1,138 +1,138 @@ type t = Dom.cssStyleDeclaration type cssRule /* TODO: Move to Webapi__Dom */ -@get external cssText: t => string = "" +@get external cssText: t => string = "cssText" @set external setCssText: (t, string) => unit = "cssText" -@get external length: t => int = "" -@get external parentRule: t => cssRule = "" +@get external length: t => int = "length" +@get external parentRule: t => cssRule = "parentRule" -@send external getPropertyPriority: (t, string) => string = "" -@send external getPropertyValue: (t, string) => string = "" -@send external item: (t, int) => string = "" -@send external removeProperty: (t, string) => string = "" -@send external setProperty: (t, string, string, string) => unit = "" -@send external setPropertyValue: (t, string, string) => unit = "" +@send external getPropertyPriority: (t, string) => string = "getPropertyPriority" +@send external getPropertyValue: (t, string) => string = "getPropertyValue" +@send external item: (t, int) => string = "item" +@send external removeProperty: (t, string) => string = "removeProperty" +@send external setProperty: (t, string, string, string) => unit = "setProperty" +@send external setPropertyValue: (t, string, string) => unit = "setPropertyValue" /* CSS2Properties */ -@get external azimuth: t => string = "" -@get external background: t => string = "" -@get external backgroundAttachment: t => string = "" -@get external backgroundColor: t => string = "" -@get external backgroundImage: t => string = "" -@get external backgroundPosition: t => string = "" -@get external backgroundRepeat: t => string = "" -@get external border: t => string = "" -@get external borderCollapse: t => string = "" -@get external borderColor: t => string = "" -@get external borderSpacing: t => string = "" -@get external borderStyle: t => string = "" -@get external borderTop: t => string = "" -@get external borderRight: t => string = "" -@get external borderBottom: t => string = "" -@get external borderLeft: t => string = "" -@get external borderTopColor: t => string = "" -@get external borderRightColor: t => string = "" -@get external borderBottomColor: t => string = "" -@get external borderLeftColor: t => string = "" -@get external borderTopStyle: t => string = "" -@get external borderRightStyle: t => string = "" -@get external borderBottomStyle: t => string = "" -@get external borderLeftStyle: t => string = "" -@get external borderTopWidth: t => string = "" -@get external borderRightWidth: t => string = "" -@get external borderBottomWidth: t => string = "" -@get external borderLeftWidth: t => string = "" -@get external borderWidth: t => string = "" -@get external bottom: t => string = "" -@get external captionSide: t => string = "" -@get external clear: t => string = "" -@get external clip: t => string = "" -@get external color: t => string = "" -@get external content: t => string = "" -@get external counterIncrement: t => string = "" -@get external counterReset: t => string = "" -@get external cue: t => string = "" -@get external cueAfter: t => string = "" -@get external cueBefore: t => string = "" -@get external cursor: t => string = "" -@get external direction: t => string = "" -@get external display: t => string = "" -@get external elevation: t => string = "" -@get external emptyCells: t => string = "" -@get external cssFloat: t => string = "" -@get external font: t => string = "" -@get external fontFamily: t => string = "" -@get external fontSize: t => string = "" -@get external fontSizeAdjust: t => string = "" -@get external fontStretch: t => string = "" -@get external fontStyle: t => string = "" -@get external fontVariant: t => string = "" -@get external fontWeight: t => string = "" -@get external height: t => string = "" -@get external left: t => string = "" -@get external letterSpacing: t => string = "" -@get external lineHeight: t => string = "" -@get external listStyle: t => string = "" -@get external listStyleImage: t => string = "" -@get external listStylePosition: t => string = "" -@get external listStyleType: t => string = "" -@get external margin: t => string = "" -@get external marginTop: t => string = "" -@get external marginRight: t => string = "" -@get external marginBottom: t => string = "" -@get external marginLeft: t => string = "" -@get external markerOffset: t => string = "" -@get external marks: t => string = "" -@get external maxHeight: t => string = "" -@get external maxWidth: t => string = "" -@get external minHeight: t => string = "" -@get external minWidth: t => string = "" -@get external orphans: t => string = "" -@get external outline: t => string = "" -@get external outlineColor: t => string = "" -@get external outlineStyle: t => string = "" -@get external outlineWidth: t => string = "" -@get external overflow: t => string = "" -@get external padding: t => string = "" -@get external paddingTop: t => string = "" -@get external paddingRight: t => string = "" -@get external paddingBottom: t => string = "" -@get external paddingLeft: t => string = "" -@get external page: t => string = "" -@get external pageBreakAfter: t => string = "" -@get external pageBreakBefore: t => string = "" -@get external pageBreakInside: t => string = "" -@get external pause: t => string = "" -@get external pauseAfter: t => string = "" -@get external pauseBefore: t => string = "" -@get external pitch: t => string = "" -@get external pitchRange: t => string = "" -@get external playDuring: t => string = "" -@get external position: t => string = "" -@get external quotes: t => string = "" -@get external richness: t => string = "" -@get external right: t => string = "" -@get external size: t => string = "" -@get external speak: t => string = "" -@get external speakHeader: t => string = "" -@get external speakNumeral: t => string = "" -@get external speakPunctuation: t => string = "" -@get external speechRate: t => string = "" -@get external stress: t => string = "" -@get external tableLayout: t => string = "" -@get external textAlign: t => string = "" -@get external textDecoration: t => string = "" -@get external textIndent: t => string = "" -@get external textShadow: t => string = "" -@get external textTransform: t => string = "" -@get external top: t => string = "" -@get external unicodeBidi: t => string = "" -@get external verticalAlign: t => string = "" -@get external visibility: t => string = "" -@get external voiceFamily: t => string = "" -@get external volume: t => string = "" -@get external whiteSpace: t => string = "" -@get external widows: t => string = "" -@get external width: t => string = "" -@get external wordSpacing: t => string = "" -@get external zIndex: t => string = "" +@get external azimuth: t => string = "azimuth" +@get external background: t => string = "background" +@get external backgroundAttachment: t => string = "backgroundAttachment" +@get external backgroundColor: t => string = "backgroundColor" +@get external backgroundImage: t => string = "backgroundImage" +@get external backgroundPosition: t => string = "backgroundPosition" +@get external backgroundRepeat: t => string = "backgroundRepeat" +@get external border: t => string = "border" +@get external borderCollapse: t => string = "borderCollapse" +@get external borderColor: t => string = "borderColor" +@get external borderSpacing: t => string = "borderSpacing" +@get external borderStyle: t => string = "borderStyle" +@get external borderTop: t => string = "borderTop" +@get external borderRight: t => string = "borderRight" +@get external borderBottom: t => string = "borderBottom" +@get external borderLeft: t => string = "borderLeft" +@get external borderTopColor: t => string = "borderTopColor" +@get external borderRightColor: t => string = "borderRightColor" +@get external borderBottomColor: t => string = "borderBottomColor" +@get external borderLeftColor: t => string = "borderLeftColor" +@get external borderTopStyle: t => string = "borderTopStyle" +@get external borderRightStyle: t => string = "borderRightStyle" +@get external borderBottomStyle: t => string = "borderBottomStyle" +@get external borderLeftStyle: t => string = "borderLeftStyle" +@get external borderTopWidth: t => string = "borderTopWidth" +@get external borderRightWidth: t => string = "borderRightWidth" +@get external borderBottomWidth: t => string = "borderBottomWidth" +@get external borderLeftWidth: t => string = "borderLeftWidth" +@get external borderWidth: t => string = "borderWidth" +@get external bottom: t => string = "bottom" +@get external captionSide: t => string = "captionSide" +@get external clear: t => string = "clear" +@get external clip: t => string = "clip" +@get external color: t => string = "color" +@get external content: t => string = "content" +@get external counterIncrement: t => string = "counterIncrement" +@get external counterReset: t => string = "counterReset" +@get external cue: t => string = "cue" +@get external cueAfter: t => string = "cueAfter" +@get external cueBefore: t => string = "cueBefore" +@get external cursor: t => string = "cursor" +@get external direction: t => string = "direction" +@get external display: t => string = "display" +@get external elevation: t => string = "elevation" +@get external emptyCells: t => string = "emptyCells" +@get external cssFloat: t => string = "cssFloat" +@get external font: t => string = "font" +@get external fontFamily: t => string = "fontFamily" +@get external fontSize: t => string = "fontSize" +@get external fontSizeAdjust: t => string = "fontSizeAdjust" +@get external fontStretch: t => string = "fontStretch" +@get external fontStyle: t => string = "fontStyle" +@get external fontVariant: t => string = "fontVariant" +@get external fontWeight: t => string = "fontWeight" +@get external height: t => string = "height" +@get external left: t => string = "left" +@get external letterSpacing: t => string = "letterSpacing" +@get external lineHeight: t => string = "lineHeight" +@get external listStyle: t => string = "listStyle" +@get external listStyleImage: t => string = "listStyleImage" +@get external listStylePosition: t => string = "listStylePosition" +@get external listStyleType: t => string = "listStyleType" +@get external margin: t => string = "margin" +@get external marginTop: t => string = "marginTop" +@get external marginRight: t => string = "marginRight" +@get external marginBottom: t => string = "marginBottom" +@get external marginLeft: t => string = "marginLeft" +@get external markerOffset: t => string = "markerOffset" +@get external marks: t => string = "marks" +@get external maxHeight: t => string = "maxHeight" +@get external maxWidth: t => string = "maxWidth" +@get external minHeight: t => string = "minHeight" +@get external minWidth: t => string = "minWidth" +@get external orphans: t => string = "orphans" +@get external outline: t => string = "outline" +@get external outlineColor: t => string = "outlineColor" +@get external outlineStyle: t => string = "outlineStyle" +@get external outlineWidth: t => string = "outlineWidth" +@get external overflow: t => string = "overflow" +@get external padding: t => string = "padding" +@get external paddingTop: t => string = "paddingTop" +@get external paddingRight: t => string = "paddingRight" +@get external paddingBottom: t => string = "paddingBottom" +@get external paddingLeft: t => string = "paddingLeft" +@get external page: t => string = "page" +@get external pageBreakAfter: t => string = "pageBreakAfter" +@get external pageBreakBefore: t => string = "pageBreakBefore" +@get external pageBreakInside: t => string = "pageBreakInside" +@get external pause: t => string = "pause" +@get external pauseAfter: t => string = "pauseAfter" +@get external pauseBefore: t => string = "pauseBefore" +@get external pitch: t => string = "pitch" +@get external pitchRange: t => string = "pitchRange" +@get external playDuring: t => string = "playDuring" +@get external position: t => string = "position" +@get external quotes: t => string = "quotes" +@get external richness: t => string = "richness" +@get external right: t => string = "right" +@get external size: t => string = "size" +@get external speak: t => string = "speak" +@get external speakHeader: t => string = "speakHeader" +@get external speakNumeral: t => string = "speakNumeral" +@get external speakPunctuation: t => string = "speakPunctuation" +@get external speechRate: t => string = "speechRate" +@get external stress: t => string = "stress" +@get external tableLayout: t => string = "tableLayout" +@get external textAlign: t => string = "textAlign" +@get external textDecoration: t => string = "textDecoration" +@get external textIndent: t => string = "textIndent" +@get external textShadow: t => string = "textShadow" +@get external textTransform: t => string = "textTransform" +@get external top: t => string = "top" +@get external unicodeBidi: t => string = "unicodeBidi" +@get external verticalAlign: t => string = "verticalAlign" +@get external visibility: t => string = "visibility" +@get external voiceFamily: t => string = "voiceFamily" +@get external volume: t => string = "volume" +@get external whiteSpace: t => string = "whiteSpace" +@get external widows: t => string = "widows" +@get external width: t => string = "width" +@get external wordSpacing: t => string = "wordSpacing" +@get external zIndex: t => string = "zIndex" diff --git a/src/Webapi/Dom/Webapi__Dom__Document.res b/src/Webapi/Dom/Webapi__Dom__Document.res index 1fa7bd78..1ff8334e 100644 --- a/src/Webapi/Dom/Webapi__Dom__Document.res +++ b/src/Webapi/Dom/Webapi__Dom__Document.res @@ -25,47 +25,46 @@ module Impl = ( let ofNode = (node: Dom.node): option => Webapi__Dom__Node.nodeType(node) == Webapi__Dom__Types.Document ? Some(Obj.magic(node)) : None - @get external characterSet: T.t => string = "" - @get external compatMode: T.t => string /* compatMode enum */ = "" /* experimental */ + @get external characterSet: T.t => string = "characterSet" + @get external compatMode: T.t => string = "compatMode" /* experimental */ let compatMode: T.t => Webapi__Dom__Types.compatMode = self => Webapi__Dom__Types.decodeCompatMode(compatMode(self)) - @get external doctype: T.t => Dom.documentType = "" - @get external documentElement: T.t => Dom.element = "" - @get external documentURI: T.t => string = "" - @get external hidden: T.t => bool = "" - @get external implementation: T.t => Dom.domImplementation = "" - @get external lastStyleSheetSet: T.t => string = "" + @get external doctype: T.t => Dom.documentType = "doctype" + @get external documentElement: T.t => Dom.element = "documentElement" + @get external documentURI: T.t => string = "documentURI" + @get external hidden: T.t => bool = "hidden" + @get external implementation: T.t => Dom.domImplementation = "implementation" + @get external lastStyleSheetSet: T.t => string = "lastStyleSheetSet" @get @return(nullable) - external pointerLockElement: T.t => option = "" /* experimental */ + external pointerLockElement: T.t => option = "pointerLockElement" /* experimental */ - @get external preferredStyleSheetSet: T.t => string = "" - @get @return(nullable) external scrollingElement: T.t => option = "" - @get external selectedStyleSheetSet: T.t => string = "" + @get external preferredStyleSheetSet: T.t => string = "preferredStyleSheetSet" + @get @return(nullable) external scrollingElement: T.t => option = "scrollingElement" + @get external selectedStyleSheetSet: T.t => string = "selectedStyleSheetSet" @set external setSelectedStyleSheetSet: (T.t, string) => unit = "selectedStyleSheetSet" @get - external styleSheets: T.t => array = "" /* return StyleSheetList, not array */ - @get external styleSheetSets: T.t => array = "" - @get external visibilityState: T.t => string /* visibilityState enum */ = "" + external styleSheets: T.t => array = "styleSheets" /* return StyleSheetList, not array */ + @get external styleSheetSets: T.t => array = "styleSheetSets" + @get external visibilityState: T.t => string = "visibilityState" let visibilityState: T.t => Webapi__Dom__Types.visibilityState = self => Webapi__Dom__Types.decodeVisibilityState(visibilityState(self)) - @send external adoptNode: (T.t, Dom.element_like<'a>) => Dom.element_like<'a> = "" - @send external createAttribute: (T.t, string) => Dom.attr = "" - @send external createAttributeNS: (T.t, string, string) => Dom.attr = "" - @send external createComment: (T.t, string) => Dom.comment = "" - @send external createDocumentFragment: T.t => Dom.documentFragment = "" - @send external createElement: (T.t, string) => Dom.element = "" + @send external adoptNode: (T.t, Dom.element_like<'a>) => Dom.element_like<'a> = "adoptNode" + @send external createAttribute: (T.t, string) => Dom.attr = "createAttribute" + @send external createAttributeNS: (T.t, string, string) => Dom.attr = "createAttributeNS" + @send external createComment: (T.t, string) => Dom.comment = "createComment" + @send external createDocumentFragment: T.t => Dom.documentFragment = "createDocumentFragment" + @send external createElement: (T.t, string) => Dom.element = "createElement" @send external createElementWithOptions: (T.t, string, {..}) => Dom.element = "createElement" /* not widely supported */ - @send external createElementNS: (T.t, string, string) => Dom.element = "" + @send external createElementNS: (T.t, string, string) => Dom.element = "createElementNS" @send external createElementNSWithOptions: (T.t, string, string, {..}) => Dom.element = "createElementNS" /* not widely supported */ @send - external createEvent: (T.t, string /* large enum */) => Dom.event = - "" /* discouraged (but not deprecated) in favor of Event constructors */ - @send external createNodeIterator: (T.t, Dom.node_like<'a>) => Dom.nodeIterator = "" + external createEvent: (T.t, string) => Dom.event = "createEvent" /* discouraged (but not deprecated) in favor of Event constructors */ + @send external createNodeIterator: (T.t, Dom.node_like<'a>) => Dom.nodeIterator = "createNodeIterator" @send external createNodeIteratorWithWhatToShow: ( T.t, @@ -79,9 +78,9 @@ module Impl = ( Webapi__Dom__Types.WhatToShow.t, Dom.nodeFilter, ) => Dom.nodeIterator = "createNodeIterator" - @send external createRange: T.t => Dom.range = "" - @send external createTextNode: (T.t, string) => Dom.text = "" - @send external createTreeWalker: (T.t, Dom.element_like<'a>) => Dom.treeWalker = "" + @send external createRange: T.t => Dom.range = "createRange" + @send external createTextNode: (T.t, string) => Dom.text = "createTextNode" + @send external createTreeWalker: (T.t, Dom.element_like<'a>) => Dom.treeWalker = "createTreeWalker" @send external createTreeWalkerWithWhatToShow: ( T.t, @@ -97,14 +96,14 @@ module Impl = ( ) => Dom.treeWalker = "createTreeWalker" @send @return(nullable) external elementFromPoint: (T.t, int, int) => option = "elementFromPoint" - @send external elementsFromPoint: (T.t, int, int) => array = "" /* experimental */ - @send external enableStyleSheetsForSet: (T.t, string) => unit = "" - @send external exitPointerLock: T.t => unit = "" /* experimental */ - @send external getAnimations: T.t => array = "" /* experimental */ - @send external getElementsByClassName: (T.t, string) => Dom.htmlCollection = "" - @send external getElementsByTagName: (T.t, string) => Dom.htmlCollection = "" - @send external getElementsByTagNameNS: (T.t, string, string) => Dom.htmlCollection = "" - @send external importNode: (T.t, Dom.element_like<'a>) => Dom.element_like<'a> = "" + @send external elementsFromPoint: (T.t, int, int) => array = "elementsFromPoint" /* experimental */ + @send external enableStyleSheetsForSet: (T.t, string) => unit = "enableStyleSheetsForSet" + @send external exitPointerLock: T.t => unit = "exitPointerLock" /* experimental */ + @send external getAnimations: T.t => array = "getAnimations" /* experimental */ + @send external getElementsByClassName: (T.t, string) => Dom.htmlCollection = "getElementsByClassName" + @send external getElementsByTagName: (T.t, string) => Dom.htmlCollection = "getElementsByTagName" + @send external getElementsByTagNameNS: (T.t, string, string) => Dom.htmlCollection = "getElementsByTagNameNS" + @send external importNode: (T.t, Dom.element_like<'a>) => Dom.element_like<'a> = "importNode" @send external importNodeDeep: (T.t, Dom.element_like<'a>, @as(json`true`) _) => Dom.element_like<'a> = "importNode" diff --git a/src/Webapi/Dom/Webapi__Dom__DocumentType.res b/src/Webapi/Dom/Webapi__Dom__DocumentType.res index d6235f5b..62a03633 100644 --- a/src/Webapi/Dom/Webapi__Dom__DocumentType.res +++ b/src/Webapi/Dom/Webapi__Dom__DocumentType.res @@ -10,6 +10,6 @@ include Webapi__Dom__ChildNode.Impl({ type t = t }) -@get external name: t => string = "" -@get external publicId: t => string = "" -@get external systemId: t => string = "" +@get external name: t => string = "name" +@get external publicId: t => string = "publicId" +@get external systemId: t => string = "systemId" diff --git a/src/Webapi/Dom/Webapi__Dom__DomImplementation.res b/src/Webapi/Dom/Webapi__Dom__DomImplementation.res index e88619ac..547c0d61 100644 --- a/src/Webapi/Dom/Webapi__Dom__DomImplementation.res +++ b/src/Webapi/Dom/Webapi__Dom__DomImplementation.res @@ -6,14 +6,14 @@ external createDocumentType: ( ~qualifiedName: string, ~publicId: string, ~systemId: string, -) => Dom.documentType = "" +) => Dom.documentType = "createDocumentType" @send external createDocument: ( t, Js.null, string, Js.null, -) => Dom.xmlDocument = "" +) => Dom.xmlDocument = "createDocument" let createDocument = ( impl, ~namespace: option=?, @@ -21,9 +21,8 @@ let createDocument = ( ~docType: option=?, (), ) => impl->createDocument(Js.Null.fromOption(namespace), qualifiedName, Js.Null.fromOption(docType)) -@send external createHTMLDocument: t => Dom.htmlDocument = "" +@send external createHTMLDocument: t => Dom.htmlDocument = "createHTMLDocument" @send external createHTMLDocumentWithTitle: (t, string) => Dom.htmlDocument = "createHTMLDocument" @send -external hasFeature: t => bool = - "" /* useless; always returns true (this is exact wording from the actual spec) */ +external hasFeature: t => bool = "hasFeature" /* useless; always returns true (this is exact wording from the actual spec) */ diff --git a/src/Webapi/Dom/Webapi__Dom__DomRect.res b/src/Webapi/Dom/Webapi__Dom__DomRect.res index a6748b70..201e7a44 100644 --- a/src/Webapi/Dom/Webapi__Dom__DomRect.res +++ b/src/Webapi/Dom/Webapi__Dom__DomRect.res @@ -4,11 +4,11 @@ type t = Dom.domRect external make: (~x: float, ~y: float, ~width: float, ~height: float) => t = "DOMRect" /* experimental */ -@get external top: t => float = "" -@get external bottom: t => float = "" -@get external left: t => float = "" -@get external right: t => float = "" -@get external height: t => float = "" -@get external width: t => float = "" -@get external x: t => float = "" -@get external y: t => float = "" +@get external top: t => float = "top" +@get external bottom: t => float = "bottom" +@get external left: t => float = "left" +@get external right: t => float = "right" +@get external height: t => float = "height" +@get external width: t => float = "width" +@get external x: t => float = "x" +@get external y: t => float = "y" diff --git a/src/Webapi/Dom/Webapi__Dom__DomTokenList.res b/src/Webapi/Dom/Webapi__Dom__DomTokenList.res index 8538379e..d3db60ab 100644 --- a/src/Webapi/Dom/Webapi__Dom__DomTokenList.res +++ b/src/Webapi/Dom/Webapi__Dom__DomTokenList.res @@ -1,25 +1,25 @@ type t = Dom.domTokenList -@get external length: t => int = "" +@get external length: t => int = "length" -@send @return(nullable) external item: (t, int) => option = "" -@send external add: (t, string) => unit = "" +@send @return(nullable) external item: (t, int) => option = "item" +@send external add: (t, string) => unit = "add" @send @variadic external addMany: (t, array) => unit = "add" @send external contains: (t, string) => bool = "contains" /* entries: iterator API, should have language support */ -@send external forEach: (t, (string, int) => unit) => unit = "" +@send external forEach: (t, (string, int) => unit) => unit = "forEach" /* keys: iterator API, should have language support */ -@send external remove: (t, string) => unit = "" +@send external remove: (t, string) => unit = "remove" @send @variadic external removeMany: (t, array) => unit = "remove" -@send external replace: (t, string, string) => unit = "" /* experimental */ -@send external supports: (t, string) => bool = "" /* experimental, Content Management Level 1 */ -@send external toggle: (t, string) => bool = "" +@send external replace: (t, string, string) => unit = "replace" /* experimental */ +@send external supports: (t, string) => bool = "supports" /* experimental, Content Management Level 1 */ +@send external toggle: (t, string) => bool = "toggle" @send external toggleForced: (t, string, @as(json`true`) _) => bool = "toggle" -@send external toString: t => string = "" +@send external toString: t => string = "toString" /* values: iterator API, should have language support */ @get -external value: t => string = "" /* experimental, from being merged with domSettableTokenList */ +external value: t => string = "value" /* experimental, from being merged with domSettableTokenList */ @set external setValue: (t, string) => unit = "value" /* experimental, from being merged with domSettableTokenList */ diff --git a/src/Webapi/Dom/Webapi__Dom__DragEvent.res b/src/Webapi/Dom/Webapi__Dom__DragEvent.res index a8751620..94f00f35 100644 --- a/src/Webapi/Dom/Webapi__Dom__DragEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__DragEvent.res @@ -13,4 +13,4 @@ include Webapi__Dom__MouseEvent.Impl({ @new external make: string => t = "DragEvent" @new external makeWithOptions: (string, {..}) => t = "DragEvent" -@get external dataTransfer: t => Dom.dataTransfer = "" +@get external dataTransfer: t => Dom.dataTransfer = "dataTransfer" diff --git a/src/Webapi/Dom/Webapi__Dom__Element.res b/src/Webapi/Dom/Webapi__Dom__Element.res index b2c8bf0b..b9ca2394 100644 --- a/src/Webapi/Dom/Webapi__Dom__Element.res +++ b/src/Webapi/Dom/Webapi__Dom__Element.res @@ -30,63 +30,63 @@ module Impl = ( let ofNode: Dom.node => option = ofNode - @get external attributes: T.t => Dom.namedNodeMap = "" - @get external classList: T.t => Dom.domTokenList = "" - @get external className: T.t => string = "" + @get external attributes: T.t => Dom.namedNodeMap = "attributes" + @get external classList: T.t => Dom.domTokenList = "classList" + @get external className: T.t => string = "className" @set external setClassName: (T.t, string) => unit = "className" - @get external clientHeight: T.t => int = "" /* experimental */ - @get external clientLeft: T.t => int = "" /* experimental */ - @get external clientTop: T.t => int = "" /* experimental */ - @get external clientWidth: T.t => int = "" /* experimental */ - @get external id: T.t => string = "" + @get external clientHeight: T.t => int = "clientHeight" /* experimental */ + @get external clientLeft: T.t => int = "clientLeft" /* experimental */ + @get external clientTop: T.t => int = "clientTop" /* experimental */ + @get external clientWidth: T.t => int = "clientWidth" /* experimental */ + @get external id: T.t => string = "id" @set external setId: (T.t, string) => unit = "id" - @get external innerHTML: T.t => string = "" + @get external innerHTML: T.t => string = "innerHTML" @set external setInnerHTML: (T.t, string) => unit = "innerHTML" - @get external localName: T.t => string = "" - @get @return(nullable) external namespaceURI: T.t => option = "" - @get external outerHTML: T.t => string = "" /* experimental, but widely supported */ + @get external localName: T.t => string = "localName" + @get @return(nullable) external namespaceURI: T.t => option = "namespaceURI" + @get external outerHTML: T.t => string = "outerHTML" /* experimental, but widely supported */ @set external setOuterHTML: (T.t, string) => unit = "outerHTML" /* experimental, but widely supported */ - @get @return(nullable) external prefix: T.t => option = "" - @get external scrollHeight: T.t => int = "" /* experimental, but widely supported */ - @get external scrollLeft: T.t => float = "" /* experimental */ + @get @return(nullable) external prefix: T.t => option = "prefix" + @get external scrollHeight: T.t => int = "scrollHeight" /* experimental, but widely supported */ + @get external scrollLeft: T.t => float = "scrollLeft" /* experimental */ @set external setScrollLeft: (T.t, float) => unit = "scrollLeft" /* experimental */ - @get external scrollTop: T.t => float = "" /* experimental, but widely supported */ + @get external scrollTop: T.t => float = "scrollTop" /* experimental, but widely supported */ @set external setScrollTop: (T.t, float) => unit = "scrollTop" /* experimental, but widely supported */ - @get external scrollWidth: T.t => int = "" /* experimental */ - @get external shadowRoot: T.t => Dom.element = "" /* experimental */ - @get external slot: T.t => string = "" /* experimental */ + @get external scrollWidth: T.t => int = "scrollWidth" /* experimental */ + @get external shadowRoot: T.t => Dom.element = "shadowRoot" /* experimental */ + @get external slot: T.t => string = "slot" /* experimental */ @set external setSlot: (T.t, string) => unit = "slot" /* experimental */ - @get external tagName: T.t => string = "" + @get external tagName: T.t => string = "tagName" - @send external attachShadow: (T.t, {"mode": string}) => Dom.shadowRoot = "" /* experimental */ + @send external attachShadow: (T.t, {"mode": string}) => Dom.shadowRoot = "attachShadow" /* experimental */ @send external attachShadowOpen: (T.t, @as(json`{ "mode": "open" }`) _) => Dom.shadowRoot = "attachShadow" /* experimental */ @send external attachShadowClosed: (T.t, @as(json`{ "mode": "closed" }`) _) => Dom.shadowRoot = "attachShadow" /* experimental */ - @send external animate: (T.t, {..}, {..}) => Dom.animation = "" /* experimental */ + @send external animate: (T.t, {..}, {..}) => Dom.animation = "animate" /* experimental */ @send @return(nullable) - external closest: (T.t, string) => option = "" /* experimental */ - @send @return(nullable) external getAttribute: (T.t, string) => option = "" - @send @return(nullable) external getAttributeNS: (T.t, string, string) => option = "" - @send external getBoundingClientRect: T.t => Dom.domRect = "" - @send external getClientRects: T.t => array = "" - @send external getElementsByClassName: (T.t, string) => Dom.htmlCollection = "" - @send external getElementsByTagName: (T.t, string) => Dom.htmlCollection = "" - @send external getElementsByTagNameNS: (T.t, string, string) => Dom.htmlCollection = "" - @send external hasAttribute: (T.t, string) => bool = "" - @send external hasAttributeNS: (T.t, string, string) => bool = "" - @send external hasAttributes: T.t => bool = "" + external closest: (T.t, string) => option = "closest" /* experimental */ + @send @return(nullable) external getAttribute: (T.t, string) => option = "getAttribute" + @send @return(nullable) external getAttributeNS: (T.t, string, string) => option = "getAttributeNS" + @send external getBoundingClientRect: T.t => Dom.domRect = "getBoundingClientRect" + @send external getClientRects: T.t => array = "getClientRects" + @send external getElementsByClassName: (T.t, string) => Dom.htmlCollection = "getElementsByClassName" + @send external getElementsByTagName: (T.t, string) => Dom.htmlCollection = "getElementsByTagName" + @send external getElementsByTagNameNS: (T.t, string, string) => Dom.htmlCollection = "getElementsByTagNameNS" + @send external hasAttribute: (T.t, string) => bool = "hasAttribute" + @send external hasAttributeNS: (T.t, string, string) => bool = "hasAttributeNS" + @send external hasAttributes: T.t => bool = "hasAttributes" @send external insertAdjacentElement: ( T.t, - string /* insertPosition enum */, + string, Dom.element_like<'a>, - ) => unit = "" /* experimental, but widely supported */ + ) => unit = "insertAdjacentElement" /* experimental, but widely supported */ let insertAdjacentElement: ( T.t, Webapi__Dom__Types.insertPosition, @@ -94,45 +94,43 @@ module Impl = ( ) => unit = (self, position, element) => self->insertAdjacentElement(Webapi__Dom__Types.encodeInsertPosition(position), element) @send - external insertAdjacentHTML: (T.t, string /* insertPosition enum */, string) => unit = - "" /* experimental, but widely supported */ + external insertAdjacentHTML: (T.t, string, string) => unit = "insertAdjacentHTML" /* experimental, but widely supported */ let insertAdjacentHTML: (T.t, Webapi__Dom__Types.insertPosition, string) => unit = ( self, position, text, ) => self->insertAdjacentHTML(Webapi__Dom__Types.encodeInsertPosition(position), text) @send - external insertAdjacentText: (T.t, string /* insertPosition enum */, string) => unit = - "" /* experimental, but widely supported */ + external insertAdjacentText: (T.t, string, string) => unit = "insertAdjacentText" /* experimental, but widely supported */ let insertAdjacentText: (T.t, Webapi__Dom__Types.insertPosition, string) => unit = ( self, position, text, ) => self->insertAdjacentText(Webapi__Dom__Types.encodeInsertPosition(position), text) - @send external matches: (T.t, string) => bool = "" /* experimental, but widely supported */ - @send external releasePointerCapture: (T.t, Dom.eventPointerId) => unit = "" - @send external removeAttribute: (T.t, string) => unit = "" - @send external removeAttributeNS: (T.t, string, string) => unit = "" - @send external requestFullscreen: T.t => unit = "" /* experimental */ - @send external requestPointerLock: T.t => unit = "" /* experimental */ - @send external scrollIntoView: T.t => unit = "" /* experimental, but widely supported */ + @send external matches: (T.t, string) => bool = "matches" /* experimental, but widely supported */ + @send external releasePointerCapture: (T.t, Dom.eventPointerId) => unit = "releasePointerCapture" + @send external removeAttribute: (T.t, string) => unit = "removeAttribute" + @send external removeAttributeNS: (T.t, string, string) => unit = "removeAttributeNS" + @send external requestFullscreen: T.t => unit = "requestFullscreen" /* experimental */ + @send external requestPointerLock: T.t => unit = "requestPointerLock" /* experimental */ + @send external scrollIntoView: T.t => unit = "scrollIntoView" /* experimental, but widely supported */ @send external scrollIntoViewNoAlignToTop: (T.t, @as(json`true`) _) => unit = "scrollIntoView" /* experimental, but widely supported */ @send external scrollIntoViewWithOptions: (T.t, {"behavior": string, "block": string}) => unit = "scrollIntoView" /* experimental */ - @send external scrollBy: (T.t, float, float) => unit = "" + @send external scrollBy: (T.t, float, float) => unit = "scrollBy" @send external scrollByWithOptions: (T.t, {"top": float, "left": float, "behavior": string}) => unit = "scrollBy" - @send external scrollTo: (T.t, float, float) => unit = "" + @send external scrollTo: (T.t, float, float) => unit = "scrollTo" @send external scrollToWithOptions: (T.t, {"top": float, "left": float, "behavior": string}) => unit = "scrollTo" - @send external setAttribute: (T.t, string, string) => unit = "" - @send external setAttributeNS: (T.t, string, string, string) => unit = "" - @send external setPointerCapture: (T.t, Dom.eventPointerId) => unit = "" + @send external setAttribute: (T.t, string, string) => unit = "setAttribute" + @send external setAttributeNS: (T.t, string, string, string) => unit = "setAttributeNS" + @send external setPointerCapture: (T.t, Dom.eventPointerId) => unit = "setPointerCapture" /* GlobalEventHandlers interface */ /* Not sure this should be exposed, since EventTarget seems like a better API */ diff --git a/src/Webapi/Dom/Webapi__Dom__ErrorEvent.res b/src/Webapi/Dom/Webapi__Dom__ErrorEvent.res index 4567cbef..6bc0fd8f 100644 --- a/src/Webapi/Dom/Webapi__Dom__ErrorEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__ErrorEvent.res @@ -7,8 +7,8 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "ErrorEvent" @new external makeWithOptions: (string, {..}) => t = "ErrorEvent" -@get external message: t => string = "" -@get external filename: t => string = "" -@get external lineno: t => int = "" -@get external colno: t => int = "" -@get external error: t => {..} = "" +@get external message: t => string = "message" +@get external filename: t => string = "filename" +@get external lineno: t => int = "lineno" +@get external colno: t => int = "colno" +@get external error: t => {..} = "error" diff --git a/src/Webapi/Dom/Webapi__Dom__Event.res b/src/Webapi/Dom/Webapi__Dom__Event.res index a8197a1d..37ce2795 100644 --- a/src/Webapi/Dom/Webapi__Dom__Event.res +++ b/src/Webapi/Dom/Webapi__Dom__Event.res @@ -3,24 +3,24 @@ module Impl = ( type t }, ) => { - @get external bubbles: T.t => bool = "" - @get external cancelable: T.t => bool = "" - @get external composed: T.t => bool = "" - @get external currentTarget: T.t => Dom.eventTarget = "" - @get external defaultPrevented: T.t => bool = "" - @get external eventPhase: T.t => int /* eventPhase enum */ = "" + @get external bubbles: T.t => bool = "bubbles" + @get external cancelable: T.t => bool = "cancelable" + @get external composed: T.t => bool = "composed" + @get external currentTarget: T.t => Dom.eventTarget = "currentTarget" + @get external defaultPrevented: T.t => bool = "defaultPrevented" + @get external eventPhase: T.t => int = "eventPhase" let eventPhase: T.t => Webapi__Dom__Types.EventPhase.t = self => Webapi__Dom__Types.EventPhase.decode(eventPhase(self)) - @get external target: T.t => Dom.eventTarget = "" - @get external timeStamp: T.t => float = "" + @get external target: T.t => Dom.eventTarget = "target" + @get external timeStamp: T.t => float = "timeStamp" @get external type_: T.t => string = "type" - @get external isTrusted: T.t => bool = "" + @get external isTrusted: T.t => bool = "isTrusted" - @send external preventDefault: T.t => unit = "" - @send external stopImmediatePropagation: T.t => unit = "" - @send external stopPropagation: T.t => unit = "" + @send external preventDefault: T.t => unit = "preventDefault" + @send external stopImmediatePropagation: T.t => unit = "stopImmediatePropagation" + @send external stopPropagation: T.t => unit = "stopPropagation" } type t = Dom.event diff --git a/src/Webapi/Dom/Webapi__Dom__EventTarget.res b/src/Webapi/Dom/Webapi__Dom__EventTarget.res index 55f5b2fe..7d8927c0 100644 --- a/src/Webapi/Dom/Webapi__Dom__EventTarget.res +++ b/src/Webapi/Dom/Webapi__Dom__EventTarget.res @@ -5,7 +5,7 @@ module Impl = ( ) => { external asEventTarget: T.t => Dom.eventTarget = "%identity" - @send external addEventListener: (T.t, string, Dom.event => unit) => unit = "" + @send external addEventListener: (T.t, string, Dom.event => unit) => unit = "addEventListener" @send external addEventListenerWithOptions: ( T.t, @@ -16,7 +16,7 @@ module Impl = ( @send external addEventListenerUseCapture: (T.t, string, Dom.event => unit, @as(json`true`) _) => unit = "addEventListener" - @send external removeEventListener: (T.t, string, Dom.event => unit) => unit = "" + @send external removeEventListener: (T.t, string, Dom.event => unit) => unit = "removeEventListener" @send external removeEventListenerWithOptions: ( T.t, @@ -31,7 +31,7 @@ module Impl = ( Dom.event => unit, @as(json`true`) _, ) => unit = "removeEventListener" - @send external dispatchEvent: (T.t, Dom.event_like<'a>) => bool = "" + @send external dispatchEvent: (T.t, Dom.event_like<'a>) => bool = "dispatchEvent" /** * non-standard event-specific functions diff --git a/src/Webapi/Dom/Webapi__Dom__FocusEvent.res b/src/Webapi/Dom/Webapi__Dom__FocusEvent.res index 61f566ab..ce0f9f05 100644 --- a/src/Webapi/Dom/Webapi__Dom__FocusEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__FocusEvent.res @@ -10,4 +10,4 @@ include Webapi__Dom__UiEvent.Impl({ @new external make: string => t = "FocusEvent" @new external makeWithOptions: (string, {..}) => t = "FocusEvent" -@get @return(nullable) external relatedTarget: t => option = "" +@get @return(nullable) external relatedTarget: t => option = "relatedTarget" diff --git a/src/Webapi/Dom/Webapi__Dom__History.res b/src/Webapi/Dom/Webapi__Dom__History.res index 762cd27f..eeecca58 100644 --- a/src/Webapi/Dom/Webapi__Dom__History.res +++ b/src/Webapi/Dom/Webapi__Dom__History.res @@ -1,13 +1,13 @@ type t = Dom.history type state /* TODO: should be "anything that can be serializable" apparently */ -@get external length: t => int = "" -@get external scrollRestoration: t => bool = "" /* experimental */ +@get external length: t => int = "length" +@get external scrollRestoration: t => bool = "scrollRestoration" /* experimental */ @set external setScrollRestoration: (t, bool) => unit = "scrollRestoration" /* experimental */ -@get external state: t => state = "" +@get external state: t => state = "state" -@send external back: t => unit = "" -@send external forward: t => unit = "" -@send external go: (t, int) => unit = "" -@send external pushState: (t, state, string, string) => unit = "" -@send external replaceState: (t, state, string, string) => unit = "" +@send external back: t => unit = "back" +@send external forward: t => unit = "forward" +@send external go: (t, int) => unit = "go" +@send external pushState: (t, state, string, string) => unit = "pushState" +@send external replaceState: (t, state, string, string) => unit = "replaceState" diff --git a/src/Webapi/Dom/Webapi__Dom__HtmlCollection.res b/src/Webapi/Dom/Webapi__Dom__HtmlCollection.res index fac50aa3..81dc8d27 100644 --- a/src/Webapi/Dom/Webapi__Dom__HtmlCollection.res +++ b/src/Webapi/Dom/Webapi__Dom__HtmlCollection.res @@ -3,6 +3,6 @@ type t = Dom.htmlCollection @val @scope(("Array", "prototype", "slice")) external toArray: t => array = "call" -@get external length: t => int = "" -@send @return(nullable) external item: (t, int) => option = "" -@send @return(nullable) external namedItem: (t, string) => option = "" +@get external length: t => int = "length" +@send @return(nullable) external item: (t, int) => option = "item" +@send @return(nullable) external namedItem: (t, string) => option = "namedItem" diff --git a/src/Webapi/Dom/Webapi__Dom__HtmlDocument.res b/src/Webapi/Dom/Webapi__Dom__HtmlDocument.res index 650561a7..e39ff4cf 100644 --- a/src/Webapi/Dom/Webapi__Dom__HtmlDocument.res +++ b/src/Webapi/Dom/Webapi__Dom__HtmlDocument.res @@ -5,65 +5,65 @@ module Impl = ( ) => { type t_htmlDocument = T.t - @get @return(nullable) external activeElement: t_htmlDocument => option = "" + @get @return(nullable) external activeElement: t_htmlDocument => option = "activeElement" @get @return(nullable) - external body: t_htmlDocument => option = "" /* returns option HTMLBodyElement */ + external body: t_htmlDocument => option = "body" /* returns option HTMLBodyElement */ @set external setBody: (t_htmlDocument, Dom.element) => unit = "body" /* accepth HTMLBodyElement */ - @get external cookie: t_htmlDocument => string = "" + @get external cookie: t_htmlDocument => string = "cookie" @set external setCookie: (t_htmlDocument, string) => unit = "cookie" - @get @return(nullable) external defaultView: t_htmlDocument => option = "" - @get external designMode: t_htmlDocument => string /* designMode enum */ = "" + @get @return(nullable) external defaultView: t_htmlDocument => option = "defaultView" + @get external designMode: t_htmlDocument => string = "designMode" let designMode: t_htmlDocument => Webapi__Dom__Types.designMode = self => Webapi__Dom__Types.decodeDesignMode(designMode(self)) @set - external setDesignMode: (t_htmlDocument, string /* designMode enum */) => unit = "designMode" + external setDesignMode: (t_htmlDocument, string) => unit = "designMode" let setDesignMode: (t_htmlDocument, Webapi__Dom__Types.designMode) => unit = (self, value) => setDesignMode(self, Webapi__Dom__Types.encodeDesignMode(value)) - @get external dir: t_htmlDocument => string /* dir enum */ = "" + @get external dir: t_htmlDocument => string = "dir" let dir: t_htmlDocument => Webapi__Dom__Types.dir = self => Webapi__Dom__Types.decodeDir(dir(self)) - @set external setDir: (t_htmlDocument, string /* dir enum */) => unit = "dir" + @set external setDir: (t_htmlDocument, string) => unit = "dir" let setDir: (t_htmlDocument, Webapi__Dom__Types.dir) => unit = (self, value) => setDir(self, Webapi__Dom__Types.encodeDir(value)) - @get @return(nullable) external domain: t_htmlDocument => option = "" + @get @return(nullable) external domain: t_htmlDocument => option = "domain" @set external setDomain: (t_htmlDocument, string) => unit = "domain" - @get external embeds: t_htmlDocument => Dom.nodeList = "" - @get external forms: t_htmlDocument => Dom.htmlCollection = "" - @get external head: t_htmlDocument => Dom.element = "" /* returns HTMLHeadElement */ - @get external images: t_htmlDocument => Dom.htmlCollection = "" - @get external lastModified: t_htmlDocument => string = "" - @get external links: t_htmlDocument => Dom.nodeList = "" - @get external location: t_htmlDocument => Dom.location = "" + @get external embeds: t_htmlDocument => Dom.nodeList = "embeds" + @get external forms: t_htmlDocument => Dom.htmlCollection = "forms" + @get external head: t_htmlDocument => Dom.element = "head" /* returns HTMLHeadElement */ + @get external images: t_htmlDocument => Dom.htmlCollection = "images" + @get external lastModified: t_htmlDocument => string = "lastModified" + @get external links: t_htmlDocument => Dom.nodeList = "links" + @get external location: t_htmlDocument => Dom.location = "location" @set external setLocation: (t_htmlDocument, string) => unit = "location" - @get external plugins: t_htmlDocument => Dom.htmlCollection = "" - @get external readyState: t_htmlDocument => string /* enum */ = "" + @get external plugins: t_htmlDocument => Dom.htmlCollection = "plugins" + @get external readyState: t_htmlDocument => string = "readyState" let readyState: t_htmlDocument => Webapi__Dom__Types.readyState = self => Webapi__Dom__Types.decodeReadyState(readyState(self)) - @get external referrer: t_htmlDocument => string = "" - @get external scripts: t_htmlDocument => Dom.htmlCollection = "" - @get external title: t_htmlDocument => string = "" + @get external referrer: t_htmlDocument => string = "referrer" + @get external scripts: t_htmlDocument => Dom.htmlCollection = "scripts" + @get external title: t_htmlDocument => string = "title" @set external setTitle: (t_htmlDocument, string) => unit = "title" @get external url: t_htmlDocument => string = "URL" - @send external close: t_htmlDocument => unit = "" - @send external execCommand: (t_htmlDocument, string, bool, Js.null) => bool = "" + @send external close: t_htmlDocument => unit = "close" + @send external execCommand: (t_htmlDocument, string, bool, Js.null) => bool = "execCommand" let execCommand: (t_htmlDocument, string, bool, option) => bool = ( self, command, show, value, ) => self->execCommand(command, show, Js.Null.fromOption(value)) - @send external getElementsByName: (t_htmlDocument, string) => Dom.nodeList = "" - @send external getSelection: t_htmlDocument => Dom.selection = "" - @send external hasFocus: t_htmlDocument => bool = "" + @send external getElementsByName: (t_htmlDocument, string) => Dom.nodeList = "getElementsByName" + @send external getSelection: t_htmlDocument => Dom.selection = "getSelection" + @send external hasFocus: t_htmlDocument => bool = "hasFocus" @send external open_: t_htmlDocument => unit = "open" - @send external queryCommandEnabled: (t_htmlDocument, string) => bool = "" - @send external queryCommandIndeterm: (t_htmlDocument, string) => bool = "" - @send external queryCommandSupported: (t_htmlDocument, string) => bool = "" - @send external queryCommandValue: (t_htmlDocument, string) => string = "" - @send external write: (t_htmlDocument, string) => unit = "" - @send external writeln: (t_htmlDocument, string) => unit = "" + @send external queryCommandEnabled: (t_htmlDocument, string) => bool = "queryCommandEnabled" + @send external queryCommandIndeterm: (t_htmlDocument, string) => bool = "queryCommandIndeterm" + @send external queryCommandSupported: (t_htmlDocument, string) => bool = "queryCommandSupported" + @send external queryCommandValue: (t_htmlDocument, string) => string = "queryCommandValue" + @send external write: (t_htmlDocument, string) => unit = "write" + @send external writeln: (t_htmlDocument, string) => unit = "writeln" } type t = Dom.htmlDocument diff --git a/src/Webapi/Dom/Webapi__Dom__HtmlElement.res b/src/Webapi/Dom/Webapi__Dom__HtmlElement.res index 8ab5c015..7903e0d6 100644 --- a/src/Webapi/Dom/Webapi__Dom__HtmlElement.res +++ b/src/Webapi/Dom/Webapi__Dom__HtmlElement.res @@ -7,87 +7,87 @@ module Impl = ( let ofElement = Webapi__Dom__Element.asHtmlElement - @get external accessKey: t_htmlElement => string = "" + @get external accessKey: t_htmlElement => string = "accessKey" @set external setAccessKey: (t_htmlElement, string) => unit = "accessKey" - @get external accessKeyLabel: t_htmlElement => string = "" - @get external contentEditable: t_htmlElement => string /* enum */ = "" + @get external accessKeyLabel: t_htmlElement => string = "accessKeyLabel" + @get external contentEditable: t_htmlElement => string = "contentEditable" let contentEditable: t_htmlElement => Webapi__Dom__Types.contentEditable = self => Webapi__Dom__Types.decodeContentEditable(contentEditable(self)) @set - external setContentEditable: (t_htmlElement, string /* enum */) => unit = "contentEditable" + external setContentEditable: (t_htmlElement, string) => unit = "contentEditable" let setContentEditable: (t_htmlElement, Webapi__Dom__Types.contentEditable) => unit = ( self, value, ) => setContentEditable(self, Webapi__Dom__Types.encodeContentEditable(value)) - @get external isContentEditable: t_htmlElement => bool = "" - @get external contextMenu: t_htmlElement => Dom.htmlElement = "" /* returns HTMLMenuElement */ + @get external isContentEditable: t_htmlElement => bool = "isContentEditable" + @get external contextMenu: t_htmlElement => Dom.htmlElement = "contextMenu" /* returns HTMLMenuElement */ @set external setContextMenu: (t_htmlElement, Dom.htmlElement) => unit = "contextMenu" /* accepts and returns HTMLMenuElement */ - @get external dataset: t_htmlElement => Dom.domStringMap = "" - @get external dir: t_htmlElement => string /* enum */ = "" + @get external dataset: t_htmlElement => Dom.domStringMap = "dataset" + @get external dir: t_htmlElement => string = "dir" let dir: t_htmlElement => Webapi__Dom__Types.dir = self => Webapi__Dom__Types.decodeDir(dir(self)) - @set external setDir: (t_htmlElement, string /* enum */) => unit = "dir" + @set external setDir: (t_htmlElement, string) => unit = "dir" let setDir: (t_htmlElement, Webapi__Dom__Types.dir) => unit = (self, value) => setDir(self, Webapi__Dom__Types.encodeDir(value)) - @get external draggable: t_htmlElement => bool = "" + @get external draggable: t_htmlElement => bool = "draggable" @set external setDraggable: (t_htmlElement, bool) => unit = "draggable" /* let setDraggable : t_htmlElement => bool => unit = fun self value => setDraggable self (Js.Boolean.to_js_boolean value); */ /* temproarily removed to reduce codegen size */ - @get external dropzone: t_htmlElement => Dom.domSettableTokenList = "" - @get external hidden: t_htmlElement => bool = "" + @get external dropzone: t_htmlElement => Dom.domSettableTokenList = "dropzone" + @get external hidden: t_htmlElement => bool = "hidden" @set external setHidden: (t_htmlElement, bool) => unit = "hidden" /* let setHidden : t_htmlElement => bool => unit = fun self value => setHidden self (Js.Boolean.to_js_boolean value); */ /* temproarily removed to reduce codegen size */ - @get external itemScope: t_htmlElement => bool = "" /* experimental */ + @get external itemScope: t_htmlElement => bool = "itemScope" /* experimental */ @set external setItemScope: (t_htmlElement, bool) => unit = "itemScope" /* let setItemScope : t_htmlElement => bool => unit = fun self value => setItemScope self (Js.Boolean.to_js_boolean value); */ /* experimental */ /* temproarily removed to reduce codegen size */ - @get external itemType: t_htmlElement => Dom.domSettableTokenList = "" /* experimental */ - @get external itemId: t_htmlElement => string = "" /* experimental */ + @get external itemType: t_htmlElement => Dom.domSettableTokenList = "itemType" /* experimental */ + @get external itemId: t_htmlElement => string = "itemId" /* experimental */ @set external setItemId: (t_htmlElement, string) => unit = "itemId" /* experimental */ - @get external itemRef: t_htmlElement => Dom.domSettableTokenList = "" /* experimental */ - @get external itemProp: t_htmlElement => Dom.domSettableTokenList = "" /* experimental */ - @get external itemValue: t_htmlElement => {..} = "" /* experimental */ + @get external itemRef: t_htmlElement => Dom.domSettableTokenList = "itemRef" /* experimental */ + @get external itemProp: t_htmlElement => Dom.domSettableTokenList = "itemProp" /* experimental */ + @get external itemValue: t_htmlElement => {..} = "itemValue" /* experimental */ @set external setItemValue: (t_htmlElement, {..}) => unit = "itemValue" /* experimental */ - @get external lang: t_htmlElement => string = "" + @get external lang: t_htmlElement => string = "lang" @set external setLang: (t_htmlElement, string) => unit = "lang" - @get external offsetHeight: t_htmlElement => int = "" /* experimental */ - @get external offsetLeft: t_htmlElement => int = "" /* experimental */ + @get external offsetHeight: t_htmlElement => int = "offsetHeight" /* experimental */ + @get external offsetLeft: t_htmlElement => int = "offsetLeft" /* experimental */ @get @return(nullable) - external offsetParent: t_htmlElement => option = "" /* experimental */ - @get external offsetTop: t_htmlElement => int = "" /* experimental, but widely supported */ - @get external offsetWidth: t_htmlElement => int = "" /* experimental */ - @get external spellcheck: t_htmlElement => bool = "" + external offsetParent: t_htmlElement => option = "offsetParent" /* experimental */ + @get external offsetTop: t_htmlElement => int = "offsetTop" /* experimental, but widely supported */ + @get external offsetWidth: t_htmlElement => int = "offsetWidth" /* experimental */ + @get external spellcheck: t_htmlElement => bool = "spellcheck" @set external setSpellcheck: (t_htmlElement, bool) => unit = "spellcheck" /* let setSpellcheck : t_htmlElement => bool => unit = fun self value => setSpellcheck self (Js.Boolean.to_js_boolean value); */ /* temproarily removed to reduce codegen size */ - @get external style: t_htmlElement => Dom.cssStyleDeclaration = "" + @get external style: t_htmlElement => Dom.cssStyleDeclaration = "style" @set external setStyle: (t_htmlElement, Dom.cssStyleDeclaration) => unit = "style" - @get external tabIndex: t_htmlElement => int = "" + @get external tabIndex: t_htmlElement => int = "tabIndex" @set external setTabIndex: (t_htmlElement, int) => unit = "tabIndex" - @get external title: t_htmlElement => string = "" + @get external title: t_htmlElement => string = "title" @set external setTitle: (t_htmlElement, string) => unit = "title" - @get external translate: t_htmlElement => bool = "" /* experimental */ + @get external translate: t_htmlElement => bool = "translate" /* experimental */ @set external setTranslate: (t_htmlElement, bool) => unit = "translate" /* let setTranslate : t_htmlElement => bool => unit = fun self value => setTranslate self (Js.Boolean.to_js_boolean value); */ /* experimental */ /* temproarily removed to reduce codegen size */ - @send external blur: t_htmlElement => unit = "" - @send external click: t_htmlElement => unit = "" - @send external focus: t_htmlElement => unit = "" + @send external blur: t_htmlElement => unit = "blur" + @send external click: t_htmlElement => unit = "click" + @send external focus: t_htmlElement => unit = "focus" @send external focusPreventScroll: (t_htmlElement, @as(json`{ "preventScroll": true }`) _) => unit = "focus" - @send external forceSpellCheck: t_htmlElement => unit = "" /* experimental */ + @send external forceSpellCheck: t_htmlElement => unit = "forceSpellCheck" /* experimental */ /* TODO: element-spcific, should be pulled out */ - @get external value: t_htmlElement => string = "" /* HTMLInputElement */ - @get external checked: t_htmlElement => bool = "" /* HTMLInputElement */ + @get external value: t_htmlElement => string = "value" /* HTMLInputElement */ + @get external checked: t_htmlElement => bool = "checked" /* HTMLInputElement */ @get external type_: t_htmlElement => string = "type" /* HTMLStyleElement */ @set external setType: (t_htmlElement, string) => unit = "type" /* HTMLStyleElement */ - @get external rel: t_htmlElement => string = "" /* HTMLLinkElement */ + @get external rel: t_htmlElement => string = "rel" /* HTMLLinkElement */ @set external setRel: (t_htmlElement, string) => unit = "rel" /* HTMLLinkElement */ - @get external href: t_htmlElement => string = "" /* HTMLLinkElement, HTMLAnchorElement */ + @get external href: t_htmlElement => string = "href" /* HTMLLinkElement, HTMLAnchorElement */ @set external setHref: (t_htmlElement, string) => unit = "href" /* HTMLLinkElement, HTMLAnchorElement */ diff --git a/src/Webapi/Dom/Webapi__Dom__HtmlFormElement.res b/src/Webapi/Dom/Webapi__Dom__HtmlFormElement.res index e49f6c09..5c1deb9a 100644 --- a/src/Webapi/Dom/Webapi__Dom__HtmlFormElement.res +++ b/src/Webapi/Dom/Webapi__Dom__HtmlFormElement.res @@ -11,32 +11,32 @@ module Impl = ( type t_htmlFormElement = T.t /* TODO: elements: HTMLFormControlsCollection */ - @get external length: t_htmlFormElement => int = "" - @get external name: t_htmlFormElement => string = "" + @get external length: t_htmlFormElement => int = "length" + @get external name: t_htmlFormElement => string = "name" @set external setName: (t_htmlFormElement, string) => unit = "name" - @get external method_: t_htmlFormElement => string = "" + @get external method_: t_htmlFormElement => string = "method_" @set external setMethod: (t_htmlFormElement, string) => unit = "method" - @get external target: t_htmlFormElement => string = "" + @get external target: t_htmlFormElement => string = "target" @set external setTarget: (t_htmlFormElement, string) => unit = "target" - @get external action: t_htmlFormElement => string = "" + @get external action: t_htmlFormElement => string = "action" @set external setAction: (t_htmlFormElement, string) => unit = "action" - @get external acceptCharset: t_htmlFormElement => string = "" + @get external acceptCharset: t_htmlFormElement => string = "acceptCharset" @set external setAcceptCharset: (t_htmlFormElement, string) => unit = "acceptCharset" - @get external autocomplete: t_htmlFormElement => string = "" + @get external autocomplete: t_htmlFormElement => string = "autocomplete" @set external setAutocomplete: (t_htmlFormElement, string) => unit = "autocomplete" - @get external noValidate: t_htmlFormElement => bool = "" + @get external noValidate: t_htmlFormElement => bool = "noValidate" @set external setNoValidate: (t_htmlFormElement, bool) => unit = "noValidate" - @get external enctype: t_htmlFormElement => string = "" + @get external enctype: t_htmlFormElement => string = "enctype" @set external setEnctype: (t_htmlFormElement, string) => unit = "enctype" - @get external encoding: t_htmlFormElement => string = "" + @get external encoding: t_htmlFormElement => string = "encoding" @set external setEncoding: (t_htmlFormElement, string) => unit = "encoding" - @send external submit: t_htmlFormElement => unit = "" - @send external reset: t_htmlFormElement => unit = "" - @send external checkValidity: t_htmlFormElement => bool = "" - @send external reportValidity: t_htmlFormElement => bool = "" + @send external submit: t_htmlFormElement => unit = "submit" + @send external reset: t_htmlFormElement => unit = "reset" + @send external checkValidity: t_htmlFormElement => bool = "checkValidity" + @send external reportValidity: t_htmlFormElement => bool = "reportValidity" - /** @since 0.18.0 */ @new external data: T.t => Webapi__FormData.t = "FormData" + @new external data: T.t => Webapi__FormData.t = "FormData" } type t = Dom.htmlFormElement diff --git a/src/Webapi/Dom/Webapi__Dom__HtmlImageElement.res b/src/Webapi/Dom/Webapi__Dom__HtmlImageElement.res index f7fbb18a..edb74e8c 100644 --- a/src/Webapi/Dom/Webapi__Dom__HtmlImageElement.res +++ b/src/Webapi/Dom/Webapi__Dom__HtmlImageElement.res @@ -3,35 +3,35 @@ type t @new external make: unit => t = "Image" @new external makeWithSize: (int, int) => t = "Image" -@get external alt: t => string = "" +@get external alt: t => string = "alt" @set external setAlt: (t, string) => unit = "alt" -@get external src: t => string = "" +@get external src: t => string = "src" @set external setSrc: (t, string) => unit = "src" -@get external srcset: t => string = "" +@get external srcset: t => string = "srcset" @set external setSrcset: (t, string) => unit = "srcset" -@get external sizes: t => string = "" +@get external sizes: t => string = "sizes" @set external setSizes: (t, string) => unit = "sizes" -@get @return(nullable) external crossOrigin: t => option = "" +@get @return(nullable) external crossOrigin: t => option = "crossOrigin" @set external setCrossOrigin: (t, Js.null) => unit = "crossOrigin" let setCrossOrigin = (self, value) => setCrossOrigin(self, Js.Null.fromOption(value)) -@get external useMap: t => string = "" +@get external useMap: t => string = "useMap" @set external setUseMap: (t, string) => unit = "useMap" -@get external isMap: t => bool = "" +@get external isMap: t => bool = "isMap" @set external setIsMap: (t, bool) => unit = "isMap" -@get external height: t => int = "" +@get external height: t => int = "height" @set external setHeight: (t, int) => unit = "height" -@get external width: t => int = "" +@get external width: t => int = "width" @set external setWidth: (t, int) => unit = "width" -@get external naturalHeight: t => int = "" -@get external naturalWidth: t => int = "" -@get external complete: t => bool = "" -@get external currentSrc: t => string = "" -@get external referrerPolicy: t => string = "" +@get external naturalHeight: t => int = "naturalHeight" +@get external naturalWidth: t => int = "naturalWidth" +@get external complete: t => bool = "complete" +@get external currentSrc: t => string = "currentSrc" +@get external referrerPolicy: t => string = "referrerPolicy" @set external setReferrerPolicy: (t, string) => unit = "referrerPolicy" -@get external decoding: t => string = "" +@get external decoding: t => string = "decoding" @set external setDecoding: (t, string) => unit = "decoding" -@send external decode: t => Js.Promise.t = "" +@send external decode: t => Js.Promise.t = "decode" include Webapi__Dom__Node.Impl({ type t = t diff --git a/src/Webapi/Dom/Webapi__Dom__HtmlInputElement.res b/src/Webapi/Dom/Webapi__Dom__HtmlInputElement.res index b00aca7f..abdedab1 100644 --- a/src/Webapi/Dom/Webapi__Dom__HtmlInputElement.res +++ b/src/Webapi/Dom/Webapi__Dom__HtmlInputElement.res @@ -10,104 +10,104 @@ module Impl = ( ) => { type t_htmlInputElement = T.t - @get @return(nullable) external form: t_htmlInputElement => option = "" - @get external formAction: t_htmlInputElement => string = "" + @get @return(nullable) external form: t_htmlInputElement => option = "form" + @get external formAction: t_htmlInputElement => string = "formAction" @set external setFormAction: (t_htmlInputElement, string) => unit = "formAction" - @get external formEncType: t_htmlInputElement => string = "" + @get external formEncType: t_htmlInputElement => string = "formEncType" @set external setFormEncType: (t_htmlInputElement, string) => unit = "formEncType" - @get external formMethod: t_htmlInputElement => string = "" + @get external formMethod: t_htmlInputElement => string = "formMethod" @set external setFormMethod: (t_htmlInputElement, string) => unit = "formMethod" - @get external formNoValidate: t_htmlInputElement => bool = "" + @get external formNoValidate: t_htmlInputElement => bool = "formNoValidate" @set external setFormNoValidate: (t_htmlInputElement, bool) => unit = "formNoValidate" - @get external formTarget: t_htmlInputElement => string = "" + @get external formTarget: t_htmlInputElement => string = "formTarget" @set external setFormTarget: (t_htmlInputElement, string) => unit = "formTarget" /* Properties that apply to any type of input element that is not hidden */ - @get external name: t_htmlInputElement => string = "" + @get external name: t_htmlInputElement => string = "name" @set external setName: (t_htmlInputElement, string) => unit = "name" @get external type_: t_htmlInputElement => string = "type" @set external setType: (t_htmlInputElement, string) => unit = "type" - @get external disabled: t_htmlInputElement => bool = "" + @get external disabled: t_htmlInputElement => bool = "disabled" @set external setDisabled: (t_htmlInputElement, bool) => unit = "disabled" - @get external autofocus: t_htmlInputElement => bool = "" + @get external autofocus: t_htmlInputElement => bool = "autofocus" @set external setAutofocus: (t_htmlInputElement, bool) => unit = "autofocus" - @get external required: t_htmlInputElement => bool = "" + @get external required: t_htmlInputElement => bool = "required" @set external setRequired: (t_htmlInputElement, bool) => unit = "required" - @get external value: t_htmlInputElement => string = "" + @get external value: t_htmlInputElement => string = "value" @set external setValue: (t_htmlInputElement, string) => unit = "value" - @get external validity: t_htmlInputElement => Webapi__Dom__ValidityState.t = "" - @get external validationMessage: t_htmlInputElement => string = "" - @get external willValidate: t_htmlInputElement => bool = "" + @get external validity: t_htmlInputElement => Webapi__Dom__ValidityState.t = "validity" + @get external validationMessage: t_htmlInputElement => string = "validationMessage" + @get external willValidate: t_htmlInputElement => bool = "willValidate" /* Properties that apply only to elements of type "checkbox" or "radio" */ - @get external checked: t_htmlInputElement => bool = "" + @get external checked: t_htmlInputElement => bool = "checked" @set external setChecked: (t_htmlInputElement, bool) => unit = "checked" - @get external defaultChecked: t_htmlInputElement => bool = "" + @get external defaultChecked: t_htmlInputElement => bool = "defaultChecked" @set external setDefaultChecked: (t_htmlInputElement, bool) => unit = "defaultChecked" - @get external indeterminate: t_htmlInputElement => bool = "" + @get external indeterminate: t_htmlInputElement => bool = "indeterminate" @set external setIndeterminate: (t_htmlInputElement, bool) => unit = "indeterminate" /* Properties that apply only to elements of type "image" */ - @get external alt: t_htmlInputElement => string = "" + @get external alt: t_htmlInputElement => string = "alt" @set external setAlt: (t_htmlInputElement, string) => unit = "alt" - @get external height: t_htmlInputElement => string = "" + @get external height: t_htmlInputElement => string = "height" @set external setHeight: (t_htmlInputElement, string) => unit = "height" - @get external src: t_htmlInputElement => string = "" + @get external src: t_htmlInputElement => string = "src" @set external setSrc: (t_htmlInputElement, string) => unit = "src" - @get external width: t_htmlInputElement => string = "" + @get external width: t_htmlInputElement => string = "width" @set external setWidth: (t_htmlInputElement, string) => unit = "width" /* Properties that apply only to elements of type "file" */ - @get external accept: t_htmlInputElement => string = "" + @get external accept: t_htmlInputElement => string = "accept" @set external setAccept: (t_htmlInputElement, string) => unit = "accept" /* TODO: files: Returns/accepts a FileList object. */ /* Properties that apply only to text/number-containing or elements */ - @get external autocomplete: t_htmlInputElement => string = "" + @get external autocomplete: t_htmlInputElement => string = "autocomplete" @set external setAutocomplete: (t_htmlInputElement, string) => unit = "autocomplete" - @get external maxLength: t_htmlInputElement => int = "" + @get external maxLength: t_htmlInputElement => int = "maxLength" @set external setMaxLength: (t_htmlInputElement, int) => unit = "maxLength" - @get external minLength: t_htmlInputElement => int = "" + @get external minLength: t_htmlInputElement => int = "minLength" @set external setMinLength: (t_htmlInputElement, int) => unit = "minLength" - @get external size: t_htmlInputElement => int = "" + @get external size: t_htmlInputElement => int = "size" @set external setSize: (t_htmlInputElement, int) => unit = "size" - @get external pattern: t_htmlInputElement => string = "" + @get external pattern: t_htmlInputElement => string = "pattern" @set external setPattern: (t_htmlInputElement, string) => unit = "pattern" - @get external placeholder: t_htmlInputElement => string = "" + @get external placeholder: t_htmlInputElement => string = "placeholder" @set external setPlaceholder: (t_htmlInputElement, string) => unit = "placeholder" - @get external readOnly: t_htmlInputElement => bool = "" + @get external readOnly: t_htmlInputElement => bool = "readOnly" @set external setReadOnly: (t_htmlInputElement, bool) => unit = "readOnly" - @get external min: t_htmlInputElement => string = "" + @get external min: t_htmlInputElement => string = "min" @set external setMin: (t_htmlInputElement, string) => unit = "min" - @get external max: t_htmlInputElement => string = "" + @get external max: t_htmlInputElement => string = "max" @set external setMax: (t_htmlInputElement, string) => unit = "max" - @get external selectionStart: t_htmlInputElement => int = "" + @get external selectionStart: t_htmlInputElement => int = "selectionStart" @set external setSelectionStart: (t_htmlInputElement, int) => unit = "selectionStart" - @get external selectionEnd: t_htmlInputElement => int = "" + @get external selectionEnd: t_htmlInputElement => int = "selectionEnd" @set external setSelectionEnd: (t_htmlInputElement, int) => unit = "selectionEnd" - @get external selectionDirection: t_htmlInputElement => string = "" + @get external selectionDirection: t_htmlInputElement => string = "selectionDirection" @set external setSelectionDirection: (t_htmlInputElement, string) => unit = "selectionDirection" /* Properties not yet categorized */ - @get external defaultValue: t_htmlInputElement => string = "" + @get external defaultValue: t_htmlInputElement => string = "defaultValue" @set external setDefaultValue: (t_htmlInputElement, string) => unit = "defaultValue" - @get external dirName: t_htmlInputElement => string = "" + @get external dirName: t_htmlInputElement => string = "dirName" @set external setDirName: (t_htmlInputElement, string) => unit = "dirName" - @get external accessKey: t_htmlInputElement => string = "" + @get external accessKey: t_htmlInputElement => string = "accessKey" @set external setAccessKey: (t_htmlInputElement, string) => unit = "accessKey" - @get @return(nullable) external list: t_htmlInputElement => option = "" - @get external multiple: t_htmlInputElement => bool = "" + @get @return(nullable) external list: t_htmlInputElement => option = "list" + @get external multiple: t_htmlInputElement => bool = "multiple" @set external setMultiple: (t_htmlInputElement, bool) => unit = "multiple" /* TODO: files: FileList array. Returns the list of selected files. */ - @get external labels: t_htmlInputElement => array = "" - @get external step: t_htmlInputElement => string = "" + @get external labels: t_htmlInputElement => array = "labels" + @get external step: t_htmlInputElement => string = "step" @set external setStep: (t_htmlInputElement, string) => unit = "step" - @get @return(nullable) external valueAsDate: t_htmlInputElement => option = "" + @get @return(nullable) external valueAsDate: t_htmlInputElement => option = "valueAsDate" @set external setValueAsDate: (t_htmlInputElement, Js.Date.t) => unit = "valueAsDate" - @get external valueAsNumber: t_htmlInputElement => float = "" + @get external valueAsNumber: t_htmlInputElement => float = "valueAsNumber" - @send external select: t_htmlInputElement => unit = "" + @send external select: t_htmlInputElement => unit = "select" module SelectionDirection = { type t = @@ -123,7 +123,7 @@ module Impl = ( } } - @send external setSelectionRange: (t_htmlInputElement, int, int) => unit = "" + @send external setSelectionRange: (t_htmlInputElement, int, int) => unit = "setSelectionRange" @send external setSelectionRangeWithDirection_: (t_htmlInputElement, int, int, string) => unit = "setSelectionRange" @@ -182,9 +182,9 @@ module Impl = ( selectionMode->SelectionMode.toString, ) - @send external setCustomValidity: (t_htmlInputElement, string) => unit = "" - @send external checkValidity: t_htmlInputElement => bool = "" - @send external reportValidity: t_htmlInputElement => bool = "" + @send external setCustomValidity: (t_htmlInputElement, string) => unit = "setCustomValidity" + @send external checkValidity: t_htmlInputElement => bool = "checkValidity" + @send external reportValidity: t_htmlInputElement => bool = "reportValidity" @send external stepDownBy: (t_htmlInputElement, int) => unit = "stepDown" @send external stepDownByOne: t_htmlInputElement => unit = "stepDown" @send external stepUpBy: (t_htmlInputElement, int) => unit = "stepUp" diff --git a/src/Webapi/Dom/Webapi__Dom__IdbVersionChangeEvent.res b/src/Webapi/Dom/Webapi__Dom__IdbVersionChangeEvent.res index 5ea5d3df..595119e4 100644 --- a/src/Webapi/Dom/Webapi__Dom__IdbVersionChangeEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__IdbVersionChangeEvent.res @@ -7,5 +7,5 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "IDBVersionChangeEvent" @new external makeWithOptions: (string, {..}) => t = "IDBVersionChangeEvent" -@get external oldVersion: t => int = "" -@get external newVersion: t => int = "" +@get external oldVersion: t => int = "oldVersion" +@get external newVersion: t => int = "newVersion" diff --git a/src/Webapi/Dom/Webapi__Dom__Image.res b/src/Webapi/Dom/Webapi__Dom__Image.res index 08bd26bd..fbfb74dc 100644 --- a/src/Webapi/Dom/Webapi__Dom__Image.res +++ b/src/Webapi/Dom/Webapi__Dom__Image.res @@ -9,6 +9,6 @@ external makeWithData: ( @new external make: (~width: float, ~height: float) => t = "ImageData" -@get external data: t => Js.Typed_array.Uint8ClampedArray.t = "" -@get external height: t => float = "" -@get external width: t => float = "" +@get external data: t => Js.Typed_array.Uint8ClampedArray.t = "data" +@get external height: t => float = "height" +@get external width: t => float = "width" diff --git a/src/Webapi/Dom/Webapi__Dom__InputEvent.res b/src/Webapi/Dom/Webapi__Dom__InputEvent.res index 3384c601..88e0b255 100644 --- a/src/Webapi/Dom/Webapi__Dom__InputEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__InputEvent.res @@ -10,5 +10,5 @@ include Webapi__Dom__UiEvent.Impl({ @new external make: string => t = "InputEvent" @new external makeWithOptions: (string, {..}) => t = "InputEvent" -@get external data: t => string = "" -@get external isComposing: t => bool = "" +@get external data: t => string = "data" +@get external isComposing: t => bool = "isComposing" diff --git a/src/Webapi/Dom/Webapi__Dom__KeyboardEvent.res b/src/Webapi/Dom/Webapi__Dom__KeyboardEvent.res index 4dc6cf41..34e7c771 100644 --- a/src/Webapi/Dom/Webapi__Dom__KeyboardEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__KeyboardEvent.res @@ -10,17 +10,17 @@ include Webapi__Dom__UiEvent.Impl({ @new external make: string => t = "KeyboardEvent" @new external makeWithOptions: (string, {..}) => t = "KeyboardEvent" -@get external altKey: t => bool = "" -@get external code: t => string = "" -@get external ctrlKey: t => bool = "" -@get external isComposing: t => bool = "" -@get external key: t => string = "" -@get external locale: t => string = "" -@get external location: t => int = "" -@get external metaKey: t => bool = "" -@get external repeat: t => bool = "" -@get external shiftKey: t => bool = "" +@get external altKey: t => bool = "altKey" +@get external code: t => string = "code" +@get external ctrlKey: t => bool = "ctrlKey" +@get external isComposing: t => bool = "isComposing" +@get external key: t => string = "key" +@get external locale: t => string = "locale" +@get external location: t => int = "location" +@get external metaKey: t => bool = "metaKey" +@get external repeat: t => bool = "repeat" +@get external shiftKey: t => bool = "shiftKey" -@send external getModifierState: (t, string /* modifierKey enum */) => bool = "" +@send external getModifierState: (t, string) => bool = "getModifierState" let getModifierState: (t, Webapi__Dom__Types.modifierKey) => bool = (self, key) => self->getModifierState(Webapi__Dom__Types.encodeModifierKey(key)) diff --git a/src/Webapi/Dom/Webapi__Dom__Location.res b/src/Webapi/Dom/Webapi__Dom__Location.res index b5e7fd87..4cde8034 100644 --- a/src/Webapi/Dom/Webapi__Dom__Location.res +++ b/src/Webapi/Dom/Webapi__Dom__Location.res @@ -1,30 +1,30 @@ type t = Dom.location /* a more ergonomic API would perhaps accept a Window.t directly instead of Location.t */ -@get external href: t => string = "" +@get external href: t => string = "href" @set external setHref: (t, string) => unit = "href" -@get external protocol: t => string = "" +@get external protocol: t => string = "protocol" @set external setProtocol: (t, string) => unit = "protocol" -@get external host: t => string = "" +@get external host: t => string = "host" @set external setHost: (t, string) => unit = "host" -@get external hostname: t => string = "" +@get external hostname: t => string = "hostname" @set external setHostname: (t, string) => unit = "hostname" -@get external port: t => string = "" +@get external port: t => string = "port" @set external setPort: (t, string) => unit = "port" -@get external pathname: t => string = "" +@get external pathname: t => string = "pathname" @set external setPathname: (t, string) => unit = "pathname" -@get external search: t => string = "" +@get external search: t => string = "search" @set external setSearch: (t, string) => unit = "search" -@get external hash: t => string = "" +@get external hash: t => string = "hash" @set external setHash: (t, string) => unit = "hash" -@get external username: t => string = "" +@get external username: t => string = "username" @set external setUsername: (t, string) => unit = "username" -@get external password: t => string = "" +@get external password: t => string = "password" @set external setPassword: (t, string) => unit = "password" -@get external origin: t => string = "" +@get external origin: t => string = "origin" -@send external assign: (t, string) => unit = "" -@send external reload: t => unit = "" +@send external assign: (t, string) => unit = "assign" +@send external reload: t => unit = "reload" @send external reloadWithForce: (t, @as(json`true`) _) => unit = "reload" -@send external replace: (t, string) => unit = "" -@send external toString: t => string = "" +@send external replace: (t, string) => unit = "replace" +@send external toString: t => string = "toString" diff --git a/src/Webapi/Dom/Webapi__Dom__MouseEvent.res b/src/Webapi/Dom/Webapi__Dom__MouseEvent.res index 695ba077..e5e3b899 100644 --- a/src/Webapi/Dom/Webapi__Dom__MouseEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__MouseEvent.res @@ -3,27 +3,27 @@ module Impl = ( type t }, ) => { - @get external altKey: T.t => bool = "" - @get external button: T.t => int = "" - @get external buttons: T.t => int /* bitmask */ = "" - @get external clientX: T.t => int = "" - @get external clientY: T.t => int = "" - @get external ctrlKey: T.t => bool = "" - @get external metaKey: T.t => bool = "" - @get external movementX: T.t => int = "" - @get external movementY: T.t => int = "" - @get external offsetX: T.t => int = "" /* experimental, but widely supported */ - @get external offsetY: T.t => int = "" /* experimental, but widely supported */ - @get external pageX: T.t => int = "" /* experimental, but widely supported */ - @get external pageY: T.t => int = "" /* experimental, but widely supported */ - @get @return(nullable) external region: T.t => option = "" - @get @return(nullable) external relatedTarget: T.t => option = "" - @get external screenX: T.t => int = "" - @get external screenY: T.t => int = "" - @get external shiftKey: T.t => bool = "" - @get external x: T.t => int = "" /* experimental */ - @get external y: T.t => int = "" /* experimental */ - @send external getModifierState: (T.t, string /* modifierKey enum */) => bool = "" + @get external altKey: T.t => bool = "altKey" + @get external button: T.t => int = "button" + @get external buttons: T.t => int = "buttons" /* bitmask */ + @get external clientX: T.t => int = "clientX" + @get external clientY: T.t => int = "clientY" + @get external ctrlKey: T.t => bool = "ctrlKey" + @get external metaKey: T.t => bool = "metaKey" + @get external movementX: T.t => int = "movementX" + @get external movementY: T.t => int = "movementY" + @get external offsetX: T.t => int = "offsetX" /* experimental, but widely supported */ + @get external offsetY: T.t => int = "offsetY" /* experimental, but widely supported */ + @get external pageX: T.t => int = "pageX" /* experimental, but widely supported */ + @get external pageY: T.t => int = "pageY" /* experimental, but widely supported */ + @get @return(nullable) external region: T.t => option = "region" + @get @return(nullable) external relatedTarget: T.t => option = "relatedTarget" + @get external screenX: T.t => int = "screenX" + @get external screenY: T.t => int = "screenY" + @get external shiftKey: T.t => bool = "shiftKey" + @get external x: T.t => int = "x" /* experimental */ + @get external y: T.t => int = "y" /* experimental */ + @send external getModifierState: (T.t, string) => bool = "getModifierState" let getModifierState: (T.t, Webapi__Dom__Types.modifierKey) => bool = (self, key) => self->getModifierState(Webapi__Dom__Types.encodeModifierKey(key)) } diff --git a/src/Webapi/Dom/Webapi__Dom__MutationObserver.res b/src/Webapi/Dom/Webapi__Dom__MutationObserver.res index 046cb250..2340f17c 100644 --- a/src/Webapi/Dom/Webapi__Dom__MutationObserver.res +++ b/src/Webapi/Dom/Webapi__Dom__MutationObserver.res @@ -2,6 +2,6 @@ type t = Dom.mutationObserver @new external make: ((array, t) => unit) => t = "MutationObserver" -@send external observe: (t, Dom.node_like<'a>, {..}) => unit = "" -@send external disconnect: t => unit = "" -@send external takeRecords: t => array = "" +@send external observe: (t, Dom.node_like<'a>, {..}) => unit = "observe" +@send external disconnect: t => unit = "disconnect" +@send external takeRecords: t => array = "takeRecords" diff --git a/src/Webapi/Dom/Webapi__Dom__MutationRecord.res b/src/Webapi/Dom/Webapi__Dom__MutationRecord.res index 7740ab15..d60c38a5 100644 --- a/src/Webapi/Dom/Webapi__Dom__MutationRecord.res +++ b/src/Webapi/Dom/Webapi__Dom__MutationRecord.res @@ -1,11 +1,11 @@ type t = Dom.mutationRecord @get external type_: t => string = "type" -@get external target: t => Dom.node = "" -@get external addedNodes: t => Dom.nodeList = "" -@get external removedNodes: t => Dom.nodeList = "" -@get @return(nullable) external previousSibling: t => option = "" -@get @return(nullable) external pnextSibling: t => option = "" -@get external attributeName: t => string = "" -@get external attributeNamespace: t => string = "" -@get external oldValue: t => string = "" +@get external target: t => Dom.node = "target" +@get external addedNodes: t => Dom.nodeList = "addedNodes" +@get external removedNodes: t => Dom.nodeList = "removedNodes" +@get @return(nullable) external previousSibling: t => option = "previousSibling" +@get @return(nullable) external pnextSibling: t => option = "pnextSibling" +@get external attributeName: t => string = "attributeName" +@get external attributeNamespace: t => string = "attributeNamespace" +@get external oldValue: t => string = "oldValue" diff --git a/src/Webapi/Dom/Webapi__Dom__NamedNodeMap.res b/src/Webapi/Dom/Webapi__Dom__NamedNodeMap.res index f0a44ba4..ea13367d 100644 --- a/src/Webapi/Dom/Webapi__Dom__NamedNodeMap.res +++ b/src/Webapi/Dom/Webapi__Dom__NamedNodeMap.res @@ -1,13 +1,13 @@ type t = Dom.namedNodeMap -@get external length: t => int = "" +@get external length: t => int = "length" -@send @return(nullable) external item: (t, int) => option = "" -@send @return(nullable) external getNamedItem: (t, string) => option = "" -@send @return(nullable) external getNamedItemNS: (t, string, string) => option = "" -@send external setNamedItem: (t, Dom.attr) => unit = "" -@send external setNamedItemNS: (t, Dom.attr) => unit = "" -@send external removeNamedItem: (t, string) => Dom.attr = "" -@send external removeNamedItemNS: (t, string, string) => Dom.attr = "" +@send @return(nullable) external item: (t, int) => option = "item" +@send @return(nullable) external getNamedItem: (t, string) => option = "getNamedItem" +@send @return(nullable) external getNamedItemNS: (t, string, string) => option = "getNamedItemNS" +@send external setNamedItem: (t, Dom.attr) => unit = "setNamedItem" +@send external setNamedItemNS: (t, Dom.attr) => unit = "setNamedItemNS" +@send external removeNamedItem: (t, string) => Dom.attr = "removeNamedItem" +@send external removeNamedItemNS: (t, string, string) => Dom.attr = "removeNamedItemNS" @val @scope(("Array", "prototype", "slice")) external toArray: t => array = "call" diff --git a/src/Webapi/Dom/Webapi__Dom__Node.res b/src/Webapi/Dom/Webapi__Dom__Node.res index fccc8709..fef0fa85 100644 --- a/src/Webapi/Dom/Webapi__Dom__Node.res +++ b/src/Webapi/Dom/Webapi__Dom__Node.res @@ -6,17 +6,17 @@ module Impl = ( external asNode: T.t => Dom.node = "%identity" /* baseURI */ - @get external childNodes: T.t => Dom.nodeList = "" - @get @return(nullable) external firstChild: T.t => option = "" - @get external innerText: T.t => string = "" + @get external childNodes: T.t => Dom.nodeList = "childNodes" + @get @return(nullable) external firstChild: T.t => option = "firstChild" + @get external innerText: T.t => string = "innerText" @set external setInnerText: (T.t, string) => unit = "innerText" - @get @return(nullable) external lastChild: T.t => option = "" - @get @return(nullable) external nextSibling: T.t => option = "" - @get external nodeName: T.t => string = "" /* nodePrincipal */ - @get external nodeType: T.t => int /* nodeType enum */ = "" + @get @return(nullable) external lastChild: T.t => option = "lastChild" + @get @return(nullable) external nextSibling: T.t => option = "nextSibling" + @get external nodeName: T.t => string = "nodeName" /* nodePrincipal */ + @get external nodeType: T.t => int = "nodeType" let nodeType: T.t => Webapi__Dom__Types.nodeType = self => Webapi__Dom__Types.decodeNodeType(nodeType(self)) - @get @return(nullable) external nodeValue: T.t => option = "" + @get @return(nullable) external nodeValue: T.t => option = "nodeValue" @set external setNodeValue: (T.t, Js.null) => unit = "nodeValue" /* let setNodeValue : T.t => option string => unit = fun self value => setNodeValue self (Js.Null.fromOption value); */ /* temporarily removed to reduce codegen size */ @@ -25,40 +25,38 @@ module Impl = ( [@set] external clearNodeValue : T.t => _ [@as {json|null|json}] => unit = "nodeValue"; */ /* outerText */ - @get external ownerDocument: T.t => Dom.document = "" - @get @return(nullable) external parentElement: T.t => option = "" - @get @return(nullable) external parentNode: T.t => option = "" - @get @return(nullable) external previousSibling: T.t => option = "" - @get external rootNode: T.t => Dom.node = "" - @get external textContent: T.t => string = "" + @get external ownerDocument: T.t => Dom.document = "ownerDocument" + @get @return(nullable) external parentElement: T.t => option = "parentElement" + @get @return(nullable) external parentNode: T.t => option = "parentNode" + @get @return(nullable) external previousSibling: T.t => option = "previousSibling" + @get external rootNode: T.t => Dom.node = "rootNode" + @get external textContent: T.t => string = "textContent" @set external setTextContent: (T.t, string) => unit = "textContent" - @send external appendChild: (T.t, Dom.node_like<'a>) => unit = "" - @send external cloneNode: T.t => T.t = "" + @send external appendChild: (T.t, Dom.node_like<'a>) => unit = "appendChild" + @send external cloneNode: T.t => T.t = "cloneNode" @send external cloneNodeDeep: (T.t, @as(json`true`) _) => T.t = "cloneNode" @send - external compareDocumentPosition: (T.t, Dom.node_like<'a>) => int = - "" /* returns a bitmask which could also be represeneted as an enum, see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition */ - @send external contains: (T.t, Dom.node_like<'a>) => bool = "" - @send external getRootNode: T.t => Dom.node = "" + external compareDocumentPosition: (T.t, Dom.node_like<'a>) => int = "compareDocumentPosition" /* returns a bitmask which could also be represeneted as an enum, see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition */ + @send external contains: (T.t, Dom.node_like<'a>) => bool = "contains" + @send external getRootNode: T.t => Dom.node = "getRootNode" @send external getRootNodeComposed: (T.t, @as(json`{ "composed": true }`) _) => Dom.node = "getRootNode" - @send external hasChildNodes: T.t => bool = "" + @send external hasChildNodes: T.t => bool = "hasChildNodes" @send - external insertBefore: (T.t, Dom.node_like<'a>, Dom.node_like<'b>) => Dom.node_like<'a> = "" - @send external isDefaultNamespace: (T.t, string) => bool = "" - @send external isEqualNode: (T.t, Dom.node_like<'a>) => bool = "" - @send external isSameNode: (T.t, Dom.node_like<'a>) => bool = "" - @send @return(nullable) external lookupNamespaceURI: (T.t, string) => option = "" + external insertBefore: (T.t, Dom.node_like<'a>, Dom.node_like<'b>) => Dom.node_like<'a> = "insertBefore" + @send external isDefaultNamespace: (T.t, string) => bool = "isDefaultNamespace" + @send external isEqualNode: (T.t, Dom.node_like<'a>) => bool = "isEqualNode" + @send external isSameNode: (T.t, Dom.node_like<'a>) => bool = "isSameNode" + @send @return(nullable) external lookupNamespaceURI: (T.t, string) => option = "lookupNamespaceURI" @send @return(nullable) external lookupDefaultNamespaceURI: (T.t, @as(json`null`) _) => option = "lookupNamespaceURI" @send external lookupPrefix: T.t => string = "lookupPrefix" - @send external normalize: T.t => unit = "" - @send external removeChild: (T.t, Dom.node_like<'a>) => Dom.node_like<'a> = "" + @send external normalize: T.t => unit = "normalize" + @send external removeChild: (T.t, Dom.node_like<'a>) => Dom.node_like<'a> = "removeChild" - /** @since 0.19.0 */ @send - external replaceChild: (T.t, Dom.node_like<'a>, Dom.node_like<'b>) => Dom.node_like<'b> = "" + @send external replaceChild: (T.t, Dom.node_like<'a>, Dom.node_like<'b>) => Dom.node_like<'b> = "replaceChild" } type t = Dom.node diff --git a/src/Webapi/Dom/Webapi__Dom__NodeIterator.res b/src/Webapi/Dom/Webapi__Dom__NodeIterator.res index 563224a8..a8f1577d 100644 --- a/src/Webapi/Dom/Webapi__Dom__NodeIterator.res +++ b/src/Webapi/Dom/Webapi__Dom__NodeIterator.res @@ -1,11 +1,11 @@ type t = Dom.nodeIterator -@get external root: t => Dom.node = "" -@get external referenceNode: t => Dom.node = "" -@get external pointerBeforeReferenceNode: t => bool = "" -@get external whatToShow: t => Webapi__Dom__Types.WhatToShow.t = "" -@get @return(nullable) external filter: t => option = "" +@get external root: t => Dom.node = "root" +@get external referenceNode: t => Dom.node = "referenceNode" +@get external pointerBeforeReferenceNode: t => bool = "pointerBeforeReferenceNode" +@get external whatToShow: t => Webapi__Dom__Types.WhatToShow.t = "whatToShow" +@get @return(nullable) external filter: t => option = "filter" -@send @return(nullable) external nextNode: t => option = "" -@send @return(nullable) external previousNode: t => option = "" -@send external detach: t => unit = "" +@send @return(nullable) external nextNode: t => option = "nextNode" +@send @return(nullable) external previousNode: t => option = "previousNode" +@send external detach: t => unit = "detach" diff --git a/src/Webapi/Dom/Webapi__Dom__NodeList.res b/src/Webapi/Dom/Webapi__Dom__NodeList.res index 32bd5a17..3a62e7cb 100644 --- a/src/Webapi/Dom/Webapi__Dom__NodeList.res +++ b/src/Webapi/Dom/Webapi__Dom__NodeList.res @@ -2,8 +2,8 @@ type t = Dom.nodeList @val external toArray: t => array = "Array.prototype.slice.call" -@send external forEach: (t, (Dom.node, int) => unit) => unit = "" +@send external forEach: (t, (Dom.node, int) => unit) => unit = "forEach" -@get external length: t => int = "" +@get external length: t => int = "length" -@send @return(nullable) external item: (t, int) => option = "" +@send @return(nullable) external item: (t, int) => option = "item" diff --git a/src/Webapi/Dom/Webapi__Dom__NonDocumentTypeChildNode.res b/src/Webapi/Dom/Webapi__Dom__NonDocumentTypeChildNode.res index 96e61c53..4d355e67 100644 --- a/src/Webapi/Dom/Webapi__Dom__NonDocumentTypeChildNode.res +++ b/src/Webapi/Dom/Webapi__Dom__NonDocumentTypeChildNode.res @@ -4,6 +4,6 @@ module Impl = ( type t }, ) => { - @get @return(nullable) external previousElementSibling: T.t => option = "" - @get @return(nullable) external nextElementSibling: T.t => option = "" + @get @return(nullable) external previousElementSibling: T.t => option = "previousElementSibling" + @get @return(nullable) external nextElementSibling: T.t => option = "nextElementSibling" } diff --git a/src/Webapi/Dom/Webapi__Dom__NonElementParentNode.res b/src/Webapi/Dom/Webapi__Dom__NonElementParentNode.res index ca09c4b7..a2ad4358 100644 --- a/src/Webapi/Dom/Webapi__Dom__NonElementParentNode.res +++ b/src/Webapi/Dom/Webapi__Dom__NonElementParentNode.res @@ -4,5 +4,5 @@ module Impl = ( type t }, ) => { - @send @return(nullable) external getElementById: (T.t, string) => option = "" + @send @return(nullable) external getElementById: (T.t, string) => option = "getElementById" } diff --git a/src/Webapi/Dom/Webapi__Dom__PageTransitionEvent.res b/src/Webapi/Dom/Webapi__Dom__PageTransitionEvent.res index 9b4e79ea..62a278bb 100644 --- a/src/Webapi/Dom/Webapi__Dom__PageTransitionEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__PageTransitionEvent.res @@ -7,4 +7,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "PageTransitionEvent" @new external makeWithOptions: (string, {..}) => t = "PageTransitionEvent" -@get external persisted: t => bool = "" +@get external persisted: t => bool = "persisted" diff --git a/src/Webapi/Dom/Webapi__Dom__ParentNode.res b/src/Webapi/Dom/Webapi__Dom__ParentNode.res index d94cf2e6..b4691291 100644 --- a/src/Webapi/Dom/Webapi__Dom__ParentNode.res +++ b/src/Webapi/Dom/Webapi__Dom__ParentNode.res @@ -4,10 +4,10 @@ module Impl = ( type t }, ) => { - @get external children: T.t => Dom.htmlCollection = "" - @get @return(nullable) external firstElementChild: T.t => option = "" - @get @return(nullable) external lastElementChild: T.t => option = "" - @get external childElementCount: T.t => int = "" - @send @return(nullable) external querySelector: (T.t, string) => option = "" - @send external querySelectorAll: (T.t, string) => Dom.nodeList = "" + @get external children: T.t => Dom.htmlCollection = "children" + @get @return(nullable) external firstElementChild: T.t => option = "firstElementChild" + @get @return(nullable) external lastElementChild: T.t => option = "lastElementChild" + @get external childElementCount: T.t => int = "childElementCount" + @send @return(nullable) external querySelector: (T.t, string) => option = "querySelector" + @send external querySelectorAll: (T.t, string) => Dom.nodeList = "querySelectorAll" } diff --git a/src/Webapi/Dom/Webapi__Dom__PointerEvent.res b/src/Webapi/Dom/Webapi__Dom__PointerEvent.res index ef9df2a3..f9d0b835 100644 --- a/src/Webapi/Dom/Webapi__Dom__PointerEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__PointerEvent.res @@ -14,13 +14,13 @@ include Webapi__Dom__MouseEvent.Impl({ @new external make: string => t = "PointerEvent" @new external makeWithOptions: (string, {..}) => t = "PointerEvent" -@get external pointerId: t => pointerId = "" -@get external width: t => int = "" -@get external height: t => int = "" -@get external pressure: t => float = "" -@get external tiltX: t => int = "" -@get external tiltY: t => int = "" -@get external pointerType: t => string /* pointerType enum */ = "" +@get external pointerId: t => pointerId = "pointerId" +@get external width: t => int = "width" +@get external height: t => int = "height" +@get external pressure: t => float = "pressure" +@get external tiltX: t => int = "tiltX" +@get external tiltY: t => int = "tiltY" +@get external pointerType: t => string = "pointerType" let pointerType: t => Webapi__Dom__Types.pointerType = self => Webapi__Dom__Types.decodePointerType(pointerType(self)) -@get external isPrimary: t => bool = "" +@get external isPrimary: t => bool = "isPrimary" diff --git a/src/Webapi/Dom/Webapi__Dom__PopStateEvent.res b/src/Webapi/Dom/Webapi__Dom__PopStateEvent.res index f3d35f1f..fb811557 100644 --- a/src/Webapi/Dom/Webapi__Dom__PopStateEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__PopStateEvent.res @@ -7,4 +7,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "PopStateEvent" @new external makeWithOptions: (string, {..}) => t = "PopStateEvent" -@get external state: t => {..} = "" +@get external state: t => {..} = "state" diff --git a/src/Webapi/Dom/Webapi__Dom__ProcessingInstruction.res b/src/Webapi/Dom/Webapi__Dom__ProcessingInstruction.res index 3d576abe..e9826c3e 100644 --- a/src/Webapi/Dom/Webapi__Dom__ProcessingInstruction.res +++ b/src/Webapi/Dom/Webapi__Dom__ProcessingInstruction.res @@ -13,4 +13,4 @@ include Webapi__Dom__ChildNode.Impl({ type t = t }) -@get external target: t => string = "" +@get external target: t => string = "target" diff --git a/src/Webapi/Dom/Webapi__Dom__ProgressEvent.res b/src/Webapi/Dom/Webapi__Dom__ProgressEvent.res index a1a040d5..3aa506bc 100644 --- a/src/Webapi/Dom/Webapi__Dom__ProgressEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__ProgressEvent.res @@ -7,6 +7,6 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "ProgressEvent" @new external makeWithOptions: (string, {..}) => t = "ProgressEvent" -@get external lengthComputable: t => bool = "" -@get external loaded: t => int = "" -@get external total: t => int = "" +@get external lengthComputable: t => bool = "lengthComputable" +@get external loaded: t => int = "loaded" +@get external total: t => int = "total" diff --git a/src/Webapi/Dom/Webapi__Dom__Range.res b/src/Webapi/Dom/Webapi__Dom__Range.res index db6a73a4..8281dc82 100644 --- a/src/Webapi/Dom/Webapi__Dom__Range.res +++ b/src/Webapi/Dom/Webapi__Dom__Range.res @@ -2,31 +2,30 @@ type t = Dom.range @new external make: unit => t = "Range" /* experimental */ -@get external collapsed: t => bool = "" -@get external commonAncestorContainer: t => Dom.node = "" -@get external endContainer: t => Dom.node = "" -@get external endOffset: t => int = "" -@get external startContainer: t => Dom.node = "" -@get external startOffset: t => int = "" +@get external collapsed: t => bool = "collapsed" +@get external commonAncestorContainer: t => Dom.node = "commonAncestorContainer" +@get external endContainer: t => Dom.node = "endContainer" +@get external endOffset: t => int = "endOffset" +@get external startContainer: t => Dom.node = "startContainer" +@get external startOffset: t => int = "startOffset" -@send external setStart: (t, Dom.node_like<'a>, int) => unit = "" -@send external setEnd: (t, Dom.node_like<'a>, int) => unit = "" -@send external setStartBefore: (t, Dom.node_like<'a>) => unit = "" -@send external setStartAfter: (t, Dom.node_like<'a>) => unit = "" -@send external setEndBefore: (t, Dom.node_like<'a>) => unit = "" -@send external setEndAfter: (t, Dom.node_like<'a>) => unit = "" -@send external selectNode: (t, Dom.node_like<'a>) => unit = "" -@send external selectNodeContents: (t, Dom.node_like<'a>) => unit = "" -@send external collapse: t => unit = "" +@send external setStart: (t, Dom.node_like<'a>, int) => unit = "setStart" +@send external setEnd: (t, Dom.node_like<'a>, int) => unit = "setEnd" +@send external setStartBefore: (t, Dom.node_like<'a>) => unit = "setStartBefore" +@send external setStartAfter: (t, Dom.node_like<'a>) => unit = "setStartAfter" +@send external setEndBefore: (t, Dom.node_like<'a>) => unit = "setEndBefore" +@send external setEndAfter: (t, Dom.node_like<'a>) => unit = "setEndAfter" +@send external selectNode: (t, Dom.node_like<'a>) => unit = "selectNode" +@send external selectNodeContents: (t, Dom.node_like<'a>) => unit = "selectNodeContents" +@send external collapse: t => unit = "collapse" @send external collapseToStart: (t, @as(json`true`) _) => unit = "collapse" -@send external cloneContents: t => Dom.documentFragment = "" -@send external deleteContents: t => unit = "" -@send external extractContents: t => Dom.documentFragment = "" -@send external insertNode: (t, Dom.node_like<'a>) => unit = "" -@send external surroundContents: (t, Dom.node_like<'a>) => unit = "" +@send external cloneContents: t => Dom.documentFragment = "cloneContents" +@send external deleteContents: t => unit = "deleteContents" +@send external extractContents: t => Dom.documentFragment = "extractContents" +@send external insertNode: (t, Dom.node_like<'a>) => unit = "insertNode" +@send external surroundContents: (t, Dom.node_like<'a>) => unit = "surroundContents" @send -external compareBoundaryPoints: (t, int /* compareHow enum */, t) => int /* compareResult enum */ = - "" +external compareBoundaryPoints: (t, int, t) => int = "compareBoundaryPoints" let compareBoundaryPoint: ( t, Webapi__Dom__Types.compareHow, @@ -35,19 +34,18 @@ let compareBoundaryPoint: ( Webapi__Dom__Types.decodeCompareResult( self->compareBoundaryPoints(Webapi__Dom__Types.encodeCompareHow(how), range), ) -@send external cloneRange: t => t = "" -@send external detach: t => unit = "" -@send external toString: t => string = "" -@send external comparePoint: (t, Dom.node_like<'a>, int) => int /* compareRsult enum */ = "" +@send external cloneRange: t => t = "cloneRange" +@send external detach: t => unit = "detach" +@send external toString: t => string = "toString" +@send external comparePoint: (t, Dom.node_like<'a>, int) => int = "comparePoint" let comparePoint: (t, Dom.node_like<'a>, int) => Webapi__Dom__Types.compareResult = ( self, node, offset, ) => Webapi__Dom__Types.decodeCompareResult(self->comparePoint(node, offset)) @send -external createContextualFragment: (t, string) => Dom.documentFragment = - "" /* experimental, but widely supported */ -@send external getBoundingClientRect: t => Dom.domRect = "" /* experimental, but widely supported */ -@send external getClientRects: t => array = "" /* experimental, but widely supported */ -@send external intersectsNode: (t, Dom.node_like<'a>) => bool = "" -@send external isPointInRange: (t, Dom.node_like<'a>, int) => bool = "" +external createContextualFragment: (t, string) => Dom.documentFragment = "createContextualFragment" /* experimental, but widely supported */ +@send external getBoundingClientRect: t => Dom.domRect = "getBoundingClientRect" /* experimental, but widely supported */ +@send external getClientRects: t => array = "getClientRects" /* experimental, but widely supported */ +@send external intersectsNode: (t, Dom.node_like<'a>) => bool = "intersectsNode" +@send external isPointInRange: (t, Dom.node_like<'a>, int) => bool = "isPointInRange" diff --git a/src/Webapi/Dom/Webapi__Dom__RelatedEvent.res b/src/Webapi/Dom/Webapi__Dom__RelatedEvent.res index 7de51487..3b272431 100644 --- a/src/Webapi/Dom/Webapi__Dom__RelatedEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__RelatedEvent.res @@ -7,4 +7,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "RelatedEvent" @new external makeWithOptions: (string, {..}) => t = "RelatedEvent" -@get @return(nullable) external relatedTarget: t => option = "" +@get @return(nullable) external relatedTarget: t => option = "relatedTarget" diff --git a/src/Webapi/Dom/Webapi__Dom__Selection.res b/src/Webapi/Dom/Webapi__Dom__Selection.res index 1200ce4a..a9033fff 100644 --- a/src/Webapi/Dom/Webapi__Dom__Selection.res +++ b/src/Webapi/Dom/Webapi__Dom__Selection.res @@ -1,24 +1,24 @@ type t = Dom.selection -@get @return(nullable) external anchorNode: t => option = "" -@get external anchorOffset: t => int = "" -@get @return(nullable) external focusNode: t => option = "" -@get external focusOffset: t => int = "" -@get external isCollapsed: t => bool = "" -@get external rangeCount: t => int = "" +@get @return(nullable) external anchorNode: t => option = "anchorNode" +@get external anchorOffset: t => int = "anchorOffset" +@get @return(nullable) external focusNode: t => option = "focusNode" +@get external focusOffset: t => int = "focusOffset" +@get external isCollapsed: t => bool = "isCollapsed" +@get external rangeCount: t => int = "rangeCount" -@send external getRangeAt: (t, int) => Dom.range = "" -@send external collapse: (t, Dom.node_like<_>, int) => unit = "" -@send external extend: (t, Dom.node_like<_>, int) => unit = "" -@send external collapseToStart: t => unit = "" -@send external collapseToEnd: t => unit = "" -@send external selectAllChildren: (t, Dom.node_like<_>) => unit = "" -@send external setBaseAndExtent: (t, Dom.node_like<_>, int, Dom.node_like<_>, int) => unit = "" -@send external addRange: (t, Dom.range) => unit = "" -@send external removeRange: (t, Dom.range) => unit = "" -@send external removeAllRanges: t => unit = "" -@send external deleteFromDocument: t => unit = "" -@send external toString: t => string = "" -@send external containsNode: (t, Dom.node_like<_>, @as(json`false`) _) => bool = "" +@send external getRangeAt: (t, int) => Dom.range = "getRangeAt" +@send external collapse: (t, Dom.node_like<_>, int) => unit = "collapse" +@send external extend: (t, Dom.node_like<_>, int) => unit = "extend" +@send external collapseToStart: t => unit = "collapseToStart" +@send external collapseToEnd: t => unit = "collapseToEnd" +@send external selectAllChildren: (t, Dom.node_like<_>) => unit = "selectAllChildren" +@send external setBaseAndExtent: (t, Dom.node_like<_>, int, Dom.node_like<_>, int) => unit = "setBaseAndExtent" +@send external addRange: (t, Dom.range) => unit = "addRange" +@send external removeRange: (t, Dom.range) => unit = "removeRange" +@send external removeAllRanges: t => unit = "removeAllRanges" +@send external deleteFromDocument: t => unit = "deleteFromDocument" +@send external toString: t => string = "toString" +@send external containsNode: (t, Dom.node_like<_>, @as(json`false`) _) => bool = "containsNode" @send external containsNodePartly: (t, Dom.node_like<_>, @as(json`true`) _) => bool = "containsNode" diff --git a/src/Webapi/Dom/Webapi__Dom__ShadowRoot.res b/src/Webapi/Dom/Webapi__Dom__ShadowRoot.res index 61f69d2e..f7ac8b44 100644 --- a/src/Webapi/Dom/Webapi__Dom__ShadowRoot.res +++ b/src/Webapi/Dom/Webapi__Dom__ShadowRoot.res @@ -13,7 +13,7 @@ include Webapi__Dom__ParentNode.Impl({ type t = t }) -@get external shadowRootMode: t => string = "" +@get external shadowRootMode: t => string = "shadowRootMode" let shadowRootMode: t => Webapi__Dom__Types.shadowRootMode = self => Webapi__Dom__Types.decodeShadowRootMode(shadowRootMode(self)) -@get external host: t => Dom.element = "" +@get external host: t => Dom.element = "host" diff --git a/src/Webapi/Dom/Webapi__Dom__Slotable.res b/src/Webapi/Dom/Webapi__Dom__Slotable.res index 2eb1c3ac..e32b924c 100644 --- a/src/Webapi/Dom/Webapi__Dom__Slotable.res +++ b/src/Webapi/Dom/Webapi__Dom__Slotable.res @@ -4,5 +4,5 @@ module Impl = ( type t }, ) => { - @get @return(nullable) external assignedSlot: T.t => option = "" + @get @return(nullable) external assignedSlot: T.t => option = "assignedSlot" } diff --git a/src/Webapi/Dom/Webapi__Dom__StorageEvent.res b/src/Webapi/Dom/Webapi__Dom__StorageEvent.res index 416929af..1da1d382 100644 --- a/src/Webapi/Dom/Webapi__Dom__StorageEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__StorageEvent.res @@ -7,8 +7,8 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "StorageEvent" @new external makeWithOptions: (string, {..}) => t = "StorageEvent" -@get external key: t => string = "" -@get external newValue: t => Js.Nullable.t = "" -@get external oldValue: t => Js.Nullable.t = "" -@get external storageArea: t => Dom.Storage.t = "" -@get external url: t => string = "" +@get external key: t => string = "key" +@get external newValue: t => Js.Nullable.t = "newValue" +@get external oldValue: t => Js.Nullable.t = "oldValue" +@get external storageArea: t => Dom.Storage.t = "storageArea" +@get external url: t => string = "url" diff --git a/src/Webapi/Dom/Webapi__Dom__SvgZoomEvent.res b/src/Webapi/Dom/Webapi__Dom__SvgZoomEvent.res index a3e0f433..14286f6c 100644 --- a/src/Webapi/Dom/Webapi__Dom__SvgZoomEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__SvgZoomEvent.res @@ -10,8 +10,8 @@ include Webapi__Dom__UiEvent.Impl({ @new external make: string => t = "SVGZoomEvent" @new external makeWithOptions: (string, {..}) => t = "SVGZoomEvent" -@get external zoomRectScreen: t => Dom.svgRect = "" -@get external previousScale: t => float = "" -@get external previousTranslate: t => Dom.svgPoint = "" -@get external newScale: t => float = "" -@get external newTranslate: t => Dom.svgPoint = "" +@get external zoomRectScreen: t => Dom.svgRect = "zoomRectScreen" +@get external previousScale: t => float = "previousScale" +@get external previousTranslate: t => Dom.svgPoint = "previousTranslate" +@get external newScale: t => float = "newScale" +@get external newTranslate: t => Dom.svgPoint = "newTranslate" diff --git a/src/Webapi/Dom/Webapi__Dom__Text.res b/src/Webapi/Dom/Webapi__Dom__Text.res index 2638a875..aa21909d 100644 --- a/src/Webapi/Dom/Webapi__Dom__Text.res +++ b/src/Webapi/Dom/Webapi__Dom__Text.res @@ -8,8 +8,8 @@ module Impl = ( ) => { let ofNode: Dom.node => option = ofNode - @send external splitText: (T.t, ~offset: int, unit) => Dom.text = "" - @get external wholeText: T.t => string = "" + @send external splitText: (T.t, ~offset: int, unit) => Dom.text = "splitText" + @get external wholeText: T.t => string = "wholeText" } type t = Dom.text diff --git a/src/Webapi/Dom/Webapi__Dom__TimeEvent.res b/src/Webapi/Dom/Webapi__Dom__TimeEvent.res index f1c8cdcf..f0e4d607 100644 --- a/src/Webapi/Dom/Webapi__Dom__TimeEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__TimeEvent.res @@ -7,5 +7,5 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "TimeEvent" @new external makeWithOptions: (string, {..}) => t = "TimeEvent" -@get external detail: t => int = "" -@get external view: t => Dom.window = "" /* technically returns a `WindowProxy` */ +@get external detail: t => int = "detail" +@get external view: t => Dom.window = "view" /* technically returns a `WindowProxy` */ diff --git a/src/Webapi/Dom/Webapi__Dom__TouchEvent.res b/src/Webapi/Dom/Webapi__Dom__TouchEvent.res index 8a08b22f..db47740b 100644 --- a/src/Webapi/Dom/Webapi__Dom__TouchEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__TouchEvent.res @@ -5,13 +5,13 @@ module Impl = ( type t }, ) => { - @get external altKey: T.t => bool = "" - @get external changedTouches: T.t => touchList = "" - @get external ctrlKey: T.t => bool = "" - @get external metaKey: T.t => bool = "" - @get external shiftKey: T.t => bool = "" - @get external targetTouches: T.t => touchList = "" - @get external touches: T.t => touchList = "" + @get external altKey: T.t => bool = "altKey" + @get external changedTouches: T.t => touchList = "changedTouches" + @get external ctrlKey: T.t => bool = "ctrlKey" + @get external metaKey: T.t => bool = "metaKey" + @get external shiftKey: T.t => bool = "shiftKey" + @get external targetTouches: T.t => touchList = "targetTouches" + @get external touches: T.t => touchList = "touches" } type t = Dom.touchEvent diff --git a/src/Webapi/Dom/Webapi__Dom__TrackEvent.res b/src/Webapi/Dom/Webapi__Dom__TrackEvent.res index 25282cc8..45792f39 100644 --- a/src/Webapi/Dom/Webapi__Dom__TrackEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__TrackEvent.res @@ -8,4 +8,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "TrackEvent" @new external makeWithOptions: (string, {..}) => t = "TrackEvent" -@get external track: t => track = "" +@get external track: t => track = "track" diff --git a/src/Webapi/Dom/Webapi__Dom__TransitionEvent.res b/src/Webapi/Dom/Webapi__Dom__TransitionEvent.res index bac667c5..21418ace 100644 --- a/src/Webapi/Dom/Webapi__Dom__TransitionEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__TransitionEvent.res @@ -7,6 +7,6 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "TransitionEvent" @new external makeWithOptions: (string, {..}) => t = "TransitionEvent" -@get external propertyName: t => string = "" -@get external elapsedTime: t => float = "" -@get external pseudoElement: t => string /* enum-ish */ = "" +@get external propertyName: t => string = "propertyName" +@get external elapsedTime: t => float = "elapsedTime" +@get external pseudoElement: t => string = "pseudoElement" diff --git a/src/Webapi/Dom/Webapi__Dom__TreeWalker.res b/src/Webapi/Dom/Webapi__Dom__TreeWalker.res index 671eade1..f0ddadb3 100644 --- a/src/Webapi/Dom/Webapi__Dom__TreeWalker.res +++ b/src/Webapi/Dom/Webapi__Dom__TreeWalker.res @@ -1,15 +1,15 @@ type t = Dom.treeWalker -@get external root: t => Dom.node = "" -@get external whatToShow: t => Webapi__Dom__Types.WhatToShow.t = "" -@get @return(nullable) external filter: t => option = "" -@get external currentNode: t => Dom.node = "" -@set external setCurrentNode: (t, Dom.node) => unit = "" +@get external root: t => Dom.node = "root" +@get external whatToShow: t => Webapi__Dom__Types.WhatToShow.t = "whatToShow" +@get @return(nullable) external filter: t => option = "filter" +@get external currentNode: t => Dom.node = "currentNode" +@set external setCurrentNode: (t, Dom.node) => unit = "setCurrentNode" -@send @return(nullable) external parentNode: t => option = "" -@send @return(nullable) external firstChild: t => option = "" -@send @return(nullable) external lastChild: t => option = "" -@send @return(nullable) external previousSibling: t => option = "" -@send @return(nullable) external nextSibling: t => option = "" -@send @return(nullable) external previousNode: t => option = "" -@send @return(nullable) external nextNode: t => option = "" +@send @return(nullable) external parentNode: t => option = "parentNode" +@send @return(nullable) external firstChild: t => option = "firstChild" +@send @return(nullable) external lastChild: t => option = "lastChild" +@send @return(nullable) external previousSibling: t => option = "previousSibling" +@send @return(nullable) external nextSibling: t => option = "nextSibling" +@send @return(nullable) external previousNode: t => option = "previousNode" +@send @return(nullable) external nextNode: t => option = "nextNode" diff --git a/src/Webapi/Dom/Webapi__Dom__Types.res b/src/Webapi/Dom/Webapi__Dom__Types.res index 6cb716b4..03766aa5 100644 --- a/src/Webapi/Dom/Webapi__Dom__Types.res +++ b/src/Webapi/Dom/Webapi__Dom__Types.res @@ -122,7 +122,6 @@ let decodeDir = x => | _ => Unknown } -/** @since 0.17.1 */ module EventPhase = { type t = | None diff --git a/src/Webapi/Dom/Webapi__Dom__UiEvent.res b/src/Webapi/Dom/Webapi__Dom__UiEvent.res index c3fd5808..b0f30872 100644 --- a/src/Webapi/Dom/Webapi__Dom__UiEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__UiEvent.res @@ -3,8 +3,8 @@ module Impl = ( type t }, ) => { - @get external detail: T.t => int = "" - @get external view: T.t => Dom.window = "" /* technically returns a `WindowProxy` */ + @get external detail: T.t => int = "detail" + @get external view: T.t => Dom.window = "view" /* technically returns a `WindowProxy` */ } type t = Dom.uiEvent diff --git a/src/Webapi/Dom/Webapi__Dom__ValidityState.res b/src/Webapi/Dom/Webapi__Dom__ValidityState.res index 799b5819..923ac122 100644 --- a/src/Webapi/Dom/Webapi__Dom__ValidityState.res +++ b/src/Webapi/Dom/Webapi__Dom__ValidityState.res @@ -1,13 +1,13 @@ type t -@get external valueMissing: t => bool = "" -@get external typeMismatch: t => bool = "" -@get external patternMismatch: t => bool = "" -@get external tooLong: t => bool = "" -@get external tooShort: t => bool = "" -@get external rangeUnderflow: t => bool = "" -@get external rangeOverflow: t => bool = "" -@get external stepMismatch: t => bool = "" -@get external badInput: t => bool = "" -@get external customError: t => bool = "" -@get external valid: t => bool = "" +@get external valueMissing: t => bool = "valueMissing" +@get external typeMismatch: t => bool = "typeMismatch" +@get external patternMismatch: t => bool = "patternMismatch" +@get external tooLong: t => bool = "tooLong" +@get external tooShort: t => bool = "tooShort" +@get external rangeUnderflow: t => bool = "rangeUnderflow" +@get external rangeOverflow: t => bool = "rangeOverflow" +@get external stepMismatch: t => bool = "stepMismatch" +@get external badInput: t => bool = "badInput" +@get external customError: t => bool = "customError" +@get external valid: t => bool = "valid" diff --git a/src/Webapi/Dom/Webapi__Dom__WebGlContextEvent.res b/src/Webapi/Dom/Webapi__Dom__WebGlContextEvent.res index 1718cad1..099e831e 100644 --- a/src/Webapi/Dom/Webapi__Dom__WebGlContextEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__WebGlContextEvent.res @@ -7,4 +7,4 @@ include Webapi__Dom__Event.Impl({ @new external make: string => t = "WebGLContextEvent" @new external makeWithOptions: (string, {..}) => t = "WebGLContextEvent" -@get external statusMessage: t => string = "" +@get external statusMessage: t => string = "statusMessage" diff --git a/src/Webapi/Dom/Webapi__Dom__WheelEvent.res b/src/Webapi/Dom/Webapi__Dom__WheelEvent.res index d8dbe8a3..36426cfe 100644 --- a/src/Webapi/Dom/Webapi__Dom__WheelEvent.res +++ b/src/Webapi/Dom/Webapi__Dom__WheelEvent.res @@ -13,9 +13,9 @@ include Webapi__Dom__MouseEvent.Impl({ @new external make: string => t = "WheelEvent" @new external makeWithOptions: (string, {..}) => t = "WheelEvent" -@get external deltaX: t => float = "" -@get external deltaY: t => float = "" -@get external deltaZ: t => float = "" -@get external deltaMode: t => int = "" +@get external deltaX: t => float = "deltaX" +@get external deltaY: t => float = "deltaY" +@get external deltaZ: t => float = "deltaZ" +@get external deltaMode: t => int = "deltaMode" let deltaMode: t => Webapi__Dom__Types.deltaMode = self => Webapi__Dom__Types.decodeDeltaMode(deltaMode(self)) diff --git a/src/Webapi/Dom/Webapi__Dom__Window.res b/src/Webapi/Dom/Webapi__Dom__Window.res index 2a2b9a99..f1bdf352 100644 --- a/src/Webapi/Dom/Webapi__Dom__Window.res +++ b/src/Webapi/Dom/Webapi__Dom__Window.res @@ -25,75 +25,71 @@ module Impl = ( /* A lot of this isn't really "dom", but rather global exports */ - @get external console: t_window => console = "" - @get external crypto: t_window => crypto = "" - @get external document: t_window => Dom.document = "" + @get external console: t_window => console = "console" + @get external crypto: t_window => crypto = "crypto" + @get external document: t_window => Dom.document = "document" @get @return(nullable) - external frameElement: t_window => option = "" /* experimental? */ - @get external frames: t_window => frameList = "" - @get external fullScreen: t_window => bool = "" - @get external history: t_window => Dom.history = "" - @get external innerWidth: t_window => int = "" - @get external innerHeight: t_window => int = "" - @get external isSecureContext: t_window => bool = "" - @get external length: t_window => int = "" - @get external location: t_window => Dom.location = "" + external frameElement: t_window => option = "frameElement" /* experimental? */ + @get external frames: t_window => frameList = "frames" + @get external fullScreen: t_window => bool = "fullScreen" + @get external history: t_window => Dom.history = "history" + @get external innerWidth: t_window => int = "innerWidth" + @get external innerHeight: t_window => int = "innerHeight" + @get external isSecureContext: t_window => bool = "isSecureContext" + @get external length: t_window => int = "length" + @get external location: t_window => Dom.location = "location" @set external setLocation: (t_window, string) => unit = "location" - @get external locationbar: t_window => locationbar = "" + @get external locationbar: t_window => locationbar = "locationbar" /* localStorage: accessed directly via Dom.Storage.localStorage */ - @get external menubar: t_window => menubar = "" - @get external name: t_window => string = "" + @get external menubar: t_window => menubar = "menubar" + @get external name: t_window => string = "name" @set external setName: (t_window, string) => unit = "name" - @get external navigator: t_window => navigator = "" - @get @return(nullable) external opener: t_window => option = "" - @get external outerWidth: t_window => int = "" - @get external outerHeight: t_window => int = "" - @get external pageXOffset: t_window => float = "" /* alias for scrollX */ - @get external pageYOffset: t_window => float = "" /* alias for scrollY */ - @get external parent: t_window => Dom.window = "" - @get external performance: t_window => Webapi__Performance.t = "" - @get external personalbar: t_window => personalbar = "" - @get external screen: t_window => screen = "" - @get external screenX: t_window => int = "" - @get external screenY: t_window => int = "" - @get external scrollbars: t_window => scrollbars = "" - @get external scrollX: t_window => float = "" - @get external scrollY: t_window => float = "" + @get external navigator: t_window => navigator = "navigator" + @get @return(nullable) external opener: t_window => option = "opener" + @get external outerWidth: t_window => int = "outerWidth" + @get external outerHeight: t_window => int = "outerHeight" + @get external pageXOffset: t_window => float = "pageXOffset" /* alias for scrollX */ + @get external pageYOffset: t_window => float = "pageYOffset" /* alias for scrollY */ + @get external parent: t_window => Dom.window = "parent" + @get external performance: t_window => Webapi__Performance.t = "performance" + @get external personalbar: t_window => personalbar = "personalbar" + @get external screen: t_window => screen = "screen" + @get external screenX: t_window => int = "screenX" + @get external screenY: t_window => int = "screenY" + @get external scrollbars: t_window => scrollbars = "scrollbars" + @get external scrollX: t_window => float = "scrollX" + @get external scrollY: t_window => float = "scrollY" @get - external self: t_window => Dom.window = - "" /* alias for window, but apparently convenient because self (stand-alone) resolves to WorkerGlobalScope in a web worker. Probably poitnless here though */ + external self: t_window => Dom.window = "self" /* alias for window, but apparently convenient because self (stand-alone) resolves to WorkerGlobalScope in a web worker. Probably poitnless here though */ /* sessionStorage: accessed directly via Dom.Storage.sessionStorage */ - @get external speechSynthesis: t_window => speechSynthesis = "" /* experimental */ - @get external status: t_window => string = "" + @get external speechSynthesis: t_window => speechSynthesis = "speechSynthesis" /* experimental */ + @get external status: t_window => string = "status" @set external setStatus: (t_window, string) => unit = "status" - @get external statusbar: t_window => statusbar = "" - @get external toolbar: t_window => toolbar = "" - @get external top: t_window => Dom.window = "" + @get external statusbar: t_window => statusbar = "statusbar" + @get external toolbar: t_window => toolbar = "toolbar" + @get external top: t_window => Dom.window = "top" @get - external window: t_window => t_window = - "" /* This is pointless I think, it's just here because window is the implicit global scope, and it's needed to be able to get a reference to it */ + external window: t_window => t_window = "window" /* This is pointless I think, it's just here because window is the implicit global scope, and it's needed to be able to get a reference to it */ - @send external alert: (t_window, string) => unit = "" - @send external blur: t_window => unit = "" + @send external alert: (t_window, string) => unit = "alert" + @send external blur: t_window => unit = "blur" @send - external cancelIdleCallback: (t_window, idleCallbackId) => unit = - "" /* experimental, Cooperative Scheduling of Background Tasks */ - @send external close: t_window => unit = "" - @send external confirm: (t_window, string) => bool = "" - @send external focus: t_window => unit = "" - @send external getComputedStyle: (t_window, Dom.element) => Dom.cssStyleDeclaration = "" + external cancelIdleCallback: (t_window, idleCallbackId) => unit = "cancelIdleCallback" /* experimental, Cooperative Scheduling of Background Tasks */ + @send external close: t_window => unit = "close" + @send external confirm: (t_window, string) => bool = "confirm" + @send external focus: t_window => unit = "focus" + @send external getComputedStyle: (t_window, Dom.element) => Dom.cssStyleDeclaration = "getComputedStyle" @send external getComputedStyleWithPseudoElement: ( t_window, Dom.element, string, ) => Dom.cssStyleDeclaration = "getComputedStyle" - @send @return(nullable) external getSelection: t_window => option = "" + @send @return(nullable) external getSelection: t_window => option = "getSelection" @send - external matchMedia: (t_window, string) => mediaQueryList = - "" /* experimental, CSSOM View module */ - @send external moveBy: (t_window, int, int) => unit = "" /* experimental, CSSOM View module */ - @send external moveTo: (t_window, int, int) => unit = "" /* experimental, CSSOM View module */ + external matchMedia: (t_window, string) => mediaQueryList = "matchMedia" /* experimental, CSSOM View module */ + @send external moveBy: (t_window, int, int) => unit = "moveBy" /* experimental, CSSOM View module */ + @send external moveTo: (t_window, int, int) => unit = "moveTo" /* experimental, CSSOM View module */ @send @return(nullable) external open_: ( t_window, @@ -104,17 +100,16 @@ module Impl = ( ) => option = "open" /* yes, features is a stringly typed list of key value pairs, sigh */ @send - external postMessage: (t_window, 'a, string) => unit = "" /* experimental-ish?, Web Messaging */ + external postMessage: (t_window, 'a, string) => unit = "postMessage" /* experimental-ish?, Web Messaging */ @send external postMessageWithTransfers: (t_window, 'a, string, array) => unit = "postMessage" /* experimental-ish?, Web Messaging */ - @send external print: t_window => unit = "" - @send external prompt: (t_window, string) => string = "" + @send external print: t_window => unit = "print" + @send external prompt: (t_window, string) => string = "prompt" @send external promptWithDefault: (t_window, string, string) => string = "prompt" /* requestAnimationFrame: accessed directly via Webapi */ @send - external requestIdleCallback: (t_window, idleDeadline => unit) => idleCallbackId = - "" /* experimental, Cooperative Scheduling of Background Tasks */ + external requestIdleCallback: (t_window, idleDeadline => unit) => idleCallbackId = "requestIdleCallback" /* experimental, Cooperative Scheduling of Background Tasks */ @send external requestIdleCallbackWithOptions: ( t_window, @@ -122,14 +117,14 @@ module Impl = ( {"timeout": int}, ) => idleCallbackId = "requestIdleCallback" /* experimental, Cooperative Scheduling of Background Tasks */ - @send external resizeBy: (t_window, int, int) => unit = "" /* experimental, CSSOM View module */ - @send external resizeTo: (t_window, int, int) => unit = "" /* experimental, CSSOM View module */ - @send external scroll: (t_window, float, float) => unit = "" /* experimental, CSSOM View module */ + @send external resizeBy: (t_window, int, int) => unit = "resizeBy" /* experimental, CSSOM View module */ + @send external resizeTo: (t_window, int, int) => unit = "resizeTo" /* experimental, CSSOM View module */ + @send external scroll: (t_window, float, float) => unit = "scroll" /* experimental, CSSOM View module */ @send - external scrollBy: (t_window, float, float) => unit = "" /* experimental, CSSOM View module */ + external scrollBy: (t_window, float, float) => unit = "scrollBy" /* experimental, CSSOM View module */ @send - external scrollTo: (t_window, float, float) => unit = "" /* experimental, CSSOM View module */ - @send external stop: t_window => unit = "" + external scrollTo: (t_window, float, float) => unit = "scrollTo" /* experimental, CSSOM View module */ + @send external stop: t_window => unit = "stop" @send external scrollToWithOptions: (T.t, {"top": float, "left": float, "behavior": string}) => unit = "scrollTo" diff --git a/src/Webapi/ResizeObserver/Webapi__ResizeObserver__ResizeObserverEntry.res b/src/Webapi/ResizeObserver/Webapi__ResizeObserver__ResizeObserverEntry.res index e6b18816..dad93491 100644 --- a/src/Webapi/ResizeObserver/Webapi__ResizeObserver__ResizeObserverEntry.res +++ b/src/Webapi/ResizeObserver/Webapi__ResizeObserver__ResizeObserverEntry.res @@ -1,4 +1,4 @@ type t -@get external contentRect: t => Dom.domRect = "" -@get external target: t => Dom.element = "" +@get external contentRect: t => Dom.domRect = "contentRect" +@get external target: t => Dom.element = "target" diff --git a/src/Webapi/Webapi__Base64.res b/src/Webapi/Webapi__Base64.res index 2d6f4498..b2a2a56b 100644 --- a/src/Webapi/Webapi__Base64.res +++ b/src/Webapi/Webapi__Base64.res @@ -1,2 +1,2 @@ -@val external btoa: string => string = "" -@val external atob: string => string = "" +@val external btoa: string => string = "btoa" +@val external atob: string => string = "atob" diff --git a/src/Webapi/Webapi__Blob.res b/src/Webapi/Webapi__Blob.res index 999b266f..2a222ac9 100644 --- a/src/Webapi/Webapi__Blob.res +++ b/src/Webapi/Webapi__Blob.res @@ -3,15 +3,15 @@ module Impl = ( type t }, ) => { - @send external arrayBuffer: T.t => Js.Promise.t = "" + @send external arrayBuffer: T.t => Js.Promise.t = "arrayBuffer" - @get external size: T.t => float = "" + @get external size: T.t => float = "size" - @send external slice: (T.t, ~start: int=?, ~end_: int=?, ~contentType: string=?, unit) => T.t = "" + @send external slice: (T.t, ~start: int=?, ~end_: int=?, ~contentType: string=?, unit) => T.t = "slice" - /** @since 0.19.0 */ @send external stream: T.t => Webapi__ReadableStream.t = "" + @send external stream: T.t => Webapi__ReadableStream.t = "stream" - @send external text: T.t => Js.Promise.t = "" + @send external text: T.t => Js.Promise.t = "text" @get external type_: T.t => string = "type" } diff --git a/src/Webapi/Webapi__Fetch.res b/src/Webapi/Webapi__Fetch.res index 44994153..72bc00eb 100644 --- a/src/Webapi/Webapi__Fetch.res +++ b/src/Webapi/Webapi__Fetch.res @@ -421,7 +421,7 @@ module Response = { @val external error: unit => t = "error" @val external redirect: string => t = "redirect" - @val external redirectWithStatus: (string, int /* enum-ish */) => t = "redirect" + @val external redirectWithStatus: (string, int) => t = "redirect" @get external headers: t => headers = "headers" @get external ok: t => bool = "ok" @get external redirected: t => bool = "redirected" diff --git a/src/Webapi/Webapi__File.res b/src/Webapi/Webapi__File.res index 951791da..c660bd03 100644 --- a/src/Webapi/Webapi__File.res +++ b/src/Webapi/Webapi__File.res @@ -8,10 +8,10 @@ include Webapi__Blob.Impl({ @@text("{1 File class}") -/** @since 0.18.0 */ @get external lastModified: t => float = "" +@get external lastModified: t => float = "lastModified" // [@new] external make: ... = "File"; -@get external name: t => string = "" +@get external name: t => string = "name" -@get external preview: t => string = "" +@get external preview: t => string = "preview" diff --git a/src/Webapi/Webapi__Performance.res b/src/Webapi/Webapi__Performance.res index 5a88c537..defde643 100644 --- a/src/Webapi/Webapi__Performance.res +++ b/src/Webapi/Webapi__Performance.res @@ -1,3 +1,3 @@ type t -@send external now: t => float = "" +@send external now: t => float = "now" diff --git a/src/Webapi/Webapi__ReadableStream.res b/src/Webapi/Webapi__ReadableStream.res index 2f1391f9..ff594f8c 100644 --- a/src/Webapi/Webapi__ReadableStream.res +++ b/src/Webapi/Webapi__ReadableStream.res @@ -2,15 +2,15 @@ module type Reader = { type t type closed - @send external closed: t => Js.Promise.t = "" - @send external cancel: t => Js.Promise.t = "" + @send external closed: t => Js.Promise.t = "closed" + @send external cancel: t => Js.Promise.t = "cancel" @send external cancelWith: (t, string) => Js.Promise.t = "cancel" - @send external releaseLock: t => unit = "" + @send external releaseLock: t => unit = "releaseLock" } module rec DefaultReader: { include Reader - @send external read: t => Js.Promise.t> = "" + @send external read: t => Js.Promise.t> = "read" } = DefaultReader module rec BYOBReader: { @@ -21,10 +21,10 @@ module rec BYOBReader: { type t -@get external locked: t => bool = "" -@send external cancel: t => Js.Promise.t = "" +@get external locked: t => bool = "locked" +@send external cancel: t => Js.Promise.t = "cancel" @send external cancelWith: (t, string) => Js.Promise.t = "cancel" -@send external getReader: t => DefaultReader.t = "" +@send external getReader: t => DefaultReader.t = "getReader" @send external getReaderBYOB: (t, @as(json`{"mode": "byob"}`) _) => BYOBReader.t = "getReader" -@send external tee: t => (t, t) = "" +@send external tee: t => (t, t) = "tee" diff --git a/src/Webapi/Webapi__ResizeObserver.res b/src/Webapi/Webapi__ResizeObserver.res index d184e79b..018646e4 100644 --- a/src/Webapi/Webapi__ResizeObserver.res +++ b/src/Webapi/Webapi__ResizeObserver.res @@ -6,6 +6,6 @@ type t @new external makeWithObserver: ((array, t) => unit) => t = "ResizeObserver" -@send external disconnect: t => unit = "" -@send external observe: (t, Dom.element) => unit = "" -@send external unobserve: (t, Dom.element) => unit = "" +@send external disconnect: t => unit = "disconnect" +@send external observe: (t, Dom.element) => unit = "observe" +@send external unobserve: (t, Dom.element) => unit = "unobserve" diff --git a/src/Webapi/Webapi__Url.res b/src/Webapi/Webapi__Url.res index 3162d381..2c196d5e 100644 --- a/src/Webapi/Webapi__Url.res +++ b/src/Webapi/Webapi__Url.res @@ -4,49 +4,49 @@ module URLSearchParams = { @new external make: string => t = "URLSearchParams" @new external makeWithDict: Js.Dict.t => t = "URLSearchParams" @new external makeWithArray: array<(string, string)> => t = "URLSearchParams" - @send external append: (t, string, string) => unit = "" - @send external delete: (t, string) => unit = "" - @send external entries: t => Js.Array.array_like<(string, string)> = "" - @send external forEach: (t, @uncurry (string, string) => unit) => unit = "" - @return(nullable) @send external get: (t, string) => option = "" - @send external getAll: (t, string) => array = "" - @send external has: (t, string) => bool = "" - @send external keys: t => Js.Array.array_like = "" - @send external set: (t, string, string) => unit = "" - @send external sort: t => unit = "" - @send external toString: t => string = "" - @send external values: t => Js.Array.array_like = "" + @send external append: (t, string, string) => unit = "append" + @send external delete: (t, string) => unit = "delete" + @send external entries: t => Js.Array.array_like<(string, string)> = "entries" + @send external forEach: (t, @uncurry (string, string) => unit) => unit = "forEach" + @return(nullable) @send external get: (t, string) => option = "get" + @send external getAll: (t, string) => array = "getAll" + @send external has: (t, string) => bool = "has" + @send external keys: t => Js.Array.array_like = "keys" + @send external set: (t, string, string) => unit = "set" + @send external sort: t => unit = "sort" + @send external toString: t => string = "toString" + @send external values: t => Js.Array.array_like = "values" } type t @new external make: string => t = "URL" -/** @since 0.19.0 */ @new external makeWith: (string, ~base: string) => t = "URL" +@new external makeWith: (string, ~base: string) => t = "URL" -@get external hash: t => string = "" +@get external hash: t => string = "hash" @set external setHash: (t, string) => unit = "hash" -@get external host: t => string = "" +@get external host: t => string = "host" @set external setHost: (t, string) => unit = "host" -@get external hostname: t => string = "" +@get external hostname: t => string = "hostname" @set external setHostname: (t, string) => unit = "hostname" -@get external href: t => string = "" +@get external href: t => string = "href" @set external setHref: (t, string) => unit = "href" -@get external origin: t => string = "" -@get external password: t => string = "" +@get external origin: t => string = "origin" +@get external password: t => string = "password" @set external setPassword: (t, string) => unit = "password" -@get external pathname: t => string = "" +@get external pathname: t => string = "pathname" @set external setPathname: (t, string) => unit = "pathname" -@get external port: t => string = "" +@get external port: t => string = "port" @set external setPort: (t, string) => unit = "port" -@get external protocol: t => string = "" +@get external protocol: t => string = "protocol" @set external setProtocol: (t, string) => unit = "protocol" -@get external search: t => string = "" +@get external search: t => string = "search" @set external setSearch: (t, string) => unit = "search" -@get external searchParams: t => URLSearchParams.t = "" -@get external username: t => string = "" +@get external searchParams: t => URLSearchParams.t = "searchParams" +@get external username: t => string = "username" @set external setUsername: (t, string) => unit = "username" -@get external toJson: t => string = "" +@get external toJson: t => string = "toJson" -@val @scope("URL") external createObjectURL: Webapi__File.t => string = "" -@val @scope("URL") external revokeObjectURL: string => unit = "" +@val @scope("URL") external createObjectURL: Webapi__File.t => string = "createObjectURL" +@val @scope("URL") external revokeObjectURL: string => unit = "revokeObjectURL"