Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/CSSFontLoadingAPI/FontFace.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ external make: (~family: string, ~source: string, ~descriptors: fontFaceDescript
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
*/
@new
external make2: (
external fromDataView: (
~family: string,
~source: DataView.t,
~descriptors: fontFaceDescriptors=?,
Expand All @@ -21,7 +21,7 @@ external make2: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace)
*/
@new
external make3: (
external fromArrayBuffer: (
~family: string,
~source: ArrayBuffer.t,
~descriptors: fontFaceDescriptors=?,
Expand Down
28 changes: 1 addition & 27 deletions src/CanvasAPI/Path2D.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ external make: (~path: path2D=?) => path2D = "Path2D"
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Path2D)
*/
@new
external make2: (~path: string=?) => path2D = "Path2D"
external fromString: (~path: string=?) => path2D = "Path2D"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/closePath)
Expand Down Expand Up @@ -78,32 +78,6 @@ external roundRect: (
~radii_: array<float>=?,
) => unit = "roundRect"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
*/
@send
external roundRect2: (
path2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit = "roundRect"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
*/
@send
external roundRect3: (
path2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit = "roundRect"

Comment on lines -81 to -106
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were repeated, same signature as roundRect

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc)
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ChannelMessagingAPI/MessagePort.res
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Throws a "DataCloneError" DOMException if transfer contains duplicate objects or
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
*/
@send
external postMessage2: (
external postMessageWithOptions: (
messagePort,
~message: JSON.t,
~options: structuredSerializeOptions=?,
Expand Down
78 changes: 32 additions & 46 deletions src/DOMAPI/CanvasRenderingContext2D.res
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ external setTransform: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setTransform)
*/
@send
external setTransform2: (canvasRenderingContext2D, ~transform: domMatrix2DInit=?) => unit =
external setTransformWithMatrix: (canvasRenderingContext2D, ~transform: domMatrix2DInit=?) => unit =
"setTransform"

/**
Expand Down Expand Up @@ -141,7 +141,7 @@ external createPattern: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
*/
@send
external createPattern2: (
external createPatternFromSvg: (
canvasRenderingContext2D,
~image: svgImageElement,
~repetition: string,
Expand All @@ -151,7 +151,7 @@ external createPattern2: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
*/
@send
external createPattern3: (
external createPatternFromVideo: (
canvasRenderingContext2D,
~image: htmlVideoElement,
~repetition: string,
Expand All @@ -161,7 +161,7 @@ external createPattern3: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
*/
@send
external createPattern4: (
external createPatternFromCanvas: (
canvasRenderingContext2D,
~image: htmlCanvasElement,
~repetition: string,
Expand All @@ -171,7 +171,7 @@ external createPattern4: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
*/
@send
external createPattern5: (
external createPatternFromImageBitmap: (
canvasRenderingContext2D,
~image: imageBitmap,
~repetition: string,
Expand All @@ -181,7 +181,7 @@ external createPattern5: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
*/
@send
external createPattern6: (
external createPatternFromOffscreenCanvas: (
canvasRenderingContext2D,
~image: offscreenCanvas,
~repetition: string,
Expand All @@ -191,7 +191,7 @@ external createPattern6: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern)
*/
@send
external createPattern7: (
external createPatternFromVideoFrame: (
canvasRenderingContext2D,
~image: videoFrame,
~repetition: string,
Expand Down Expand Up @@ -239,8 +239,11 @@ external fill: (canvasRenderingContext2D, ~fillRule: canvasFillRule=?) => unit =
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill)
*/
@send
external fill2: (canvasRenderingContext2D, ~path: path2D, ~fillRule: canvasFillRule=?) => unit =
"fill"
external fillWithPath: (
canvasRenderingContext2D,
~path: path2D,
~fillRule: canvasFillRule=?,
) => unit = "fill"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke)
Expand All @@ -252,7 +255,7 @@ external stroke: canvasRenderingContext2D => unit = "stroke"
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke)
*/
@send
external stroke2: (canvasRenderingContext2D, path2D) => unit = "stroke"
external strokeWithPath: (canvasRenderingContext2D, path2D) => unit = "stroke"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip)
Expand All @@ -264,8 +267,11 @@ external clip: (canvasRenderingContext2D, ~fillRule: canvasFillRule=?) => unit =
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip)
*/
@send
external clip2: (canvasRenderingContext2D, ~path: path2D, ~fillRule: canvasFillRule=?) => unit =
"clip"
external clipWithPath: (
canvasRenderingContext2D,
~path: path2D,
~fillRule: canvasFillRule=?,
) => unit = "clip"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath)
Expand All @@ -282,7 +288,7 @@ external isPointInPath: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath)
*/
@send
external isPointInPath2: (
external isPointInPathWithPath: (
canvasRenderingContext2D,
~path: path2D,
~x: float,
Expand All @@ -301,8 +307,12 @@ external isPointInStroke: (canvasRenderingContext2D, ~x: float, ~y: float) => bo
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke)
*/
@send
external isPointInStroke2: (canvasRenderingContext2D, ~path: path2D, ~x: float, ~y: float) => bool =
"isPointInStroke"
external isPointInStrokeWithPath: (
canvasRenderingContext2D,
~path: path2D,
~x: float,
~y: float,
) => bool = "isPointInStroke"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)
Expand All @@ -314,8 +324,11 @@ external drawFocusIfNeeded: (canvasRenderingContext2D, element) => unit = "drawF
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)
*/
@send
external drawFocusIfNeeded2: (canvasRenderingContext2D, ~path: path2D, ~element: element) => unit =
"drawFocusIfNeeded"
external drawFocusIfNeededWithPath: (
canvasRenderingContext2D,
~path: path2D,
~element: element,
) => unit = "drawFocusIfNeeded"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillText)
Expand Down Expand Up @@ -649,7 +662,7 @@ external createImageData: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData)
*/
@send
external createImageData2: (canvasRenderingContext2D, imageData) => imageData = "createImageData"
external createImageDataFrom: (canvasRenderingContext2D, imageData) => imageData = "createImageData"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getImageData)
Expand Down Expand Up @@ -679,7 +692,7 @@ external putImageData: (
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData)
*/
@send
external putImageData2: (
external putImageDataWithDirtyRect: (
canvasRenderingContext2D,
~imagedata: imageData,
~dx: int,
Expand Down Expand Up @@ -780,33 +793,6 @@ external roundRect: (
) => unit = "roundRect"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
*/
@send
external roundRect2: (
canvasRenderingContext2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit = "roundRect"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)
*/
@send
external roundRect3: (
canvasRenderingContext2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit = "roundRect"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc)
Comment on lines -783 to -809
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were repeated as well

*/
@send
external arc: (
Expand Down
6 changes: 3 additions & 3 deletions src/DOMAPI/CharacterData.res
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/after)
*/
@send
external after2: (T.t, string) => unit = "after"
external afterText: (T.t, string) => unit = "after"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/appendData)
Expand All @@ -49,7 +49,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/before)
*/
@send
external before2: (T.t, string) => unit = "before"
external beforeText: (T.t, string) => unit = "before"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/deleteData)
Expand Down Expand Up @@ -92,7 +92,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
*/
@send
external replaceWith2: (T.t, string) => unit = "replaceWith"
external replaceWithText: (T.t, string) => unit = "replaceWith"

/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/substringData)
Expand Down
2 changes: 1 addition & 1 deletion src/DOMAPI/DOMMatrix.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ external make: (~init: string=?) => domMatrix = "DOMMatrix"
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrix)
*/
@new
external make2: (~init: array<float>=?) => domMatrix = "DOMMatrix"
external fromFloatArray: (~init: array<float>=?) => domMatrix = "DOMMatrix"

external asDOMMatrixReadOnly: domMatrix => domMatrixReadOnly = "%identity"
@scope("DOMMatrix")
Expand Down
2 changes: 1 addition & 1 deletion src/DOMAPI/DOMMatrixReadOnly.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ external make: (~init: string=?) => domMatrixReadOnly = "DOMMatrixReadOnly"
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly)
*/
@new
external make2: (~init: array<float>=?) => domMatrixReadOnly = "DOMMatrixReadOnly"
external fromFloatArray: (~init: array<float>=?) => domMatrixReadOnly = "DOMMatrixReadOnly"

@scope("DOMMatrixReadOnly")
external fromMatrix: (~other: domMatrixInit=?) => domMatrixReadOnly = "fromMatrix"
Expand Down
12 changes: 6 additions & 6 deletions src/DOMAPI/Document.res
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
*/
@send
external prepend2: (document, string) => unit = "prepend"
external prependText: (document, string) => unit = "prepend"

/**
Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
Expand All @@ -57,7 +57,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
*/
@send
external append2: (document, string) => unit = "append"
external appendText: (document, string) => unit = "append"

/**
Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
Expand All @@ -75,7 +75,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
*/
@send
external replaceChildren2: (document, string) => unit = "replaceChildren"
external replaceChildrenText: (document, string) => unit = "replaceChildren"

/**
Returns the first element that is a descendant of node that matches selectors.
Expand Down Expand Up @@ -162,7 +162,7 @@ Creates an instance of the element for the specified tag.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createElement)
*/
@send
external createElement2: (
external createElementWithOptions: (
document,
~localName: string,
~options: elementCreationOptions=?,
Expand Down Expand Up @@ -209,7 +209,7 @@ When supplied, options's is can be used to create a customized built-in element.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/createElementNS)
*/
@send
external createElementNS2: (
external createElementNSWithOptions: (
document,
~namespace: string,
~qualifiedName: string,
Expand Down Expand Up @@ -394,7 +394,7 @@ Opens a new window and loads a document specified by a given URL. Also, opens a
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/open)
*/
@send
external open2: (document, ~url: string, ~name: string, ~features: string) => window = "open"
external openWindow: (document, ~url: string, ~name: string, ~features: string) => window = "open"

/**
Closes an output stream and forces the sent data to display.
Expand Down
6 changes: 3 additions & 3 deletions src/DOMAPI/DocumentFragment.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/append)
*/
@send
external append2: (T.t, string) => unit = "append"
external appendText: (T.t, string) => unit = "append"

/**
Returns the first element within node's descendants whose ID is elementId.
Expand All @@ -56,7 +56,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/prepend)
*/
@send
external prepend2: (T.t, string) => unit = "prepend"
external prependText: (T.t, string) => unit = "prepend"

/**
Returns the first element that is a descendant of node that matches selectors.
Expand Down Expand Up @@ -88,7 +88,7 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentFragment/replaceChildren)
*/
@send
external replaceChildren2: (T.t, string) => unit = "replaceChildren"
external replaceChildrenText: (T.t, string) => unit = "replaceChildren"
}

include Impl({type t = documentFragment})
Loading