Skip to content

Commit e238509

Browse files
committed
Emit castng helpers
1 parent 4c2eab4 commit e238509

File tree

146 files changed

+408
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+408
-0
lines changed

src/CSSFontLoadingAPI/FontFaceSet.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
open EventAPI
22
open CSSFontLoadingAPI
33

4+
external asEventTarget: fontFaceSet => eventTarget = "%identity"
45
/**
56
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
67

src/CanvasAPI/OffscreenCanvas.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ open FileAPI
1010
@new
1111
external make: (~width: int, ~height: int) => offscreenCanvas = "OffscreenCanvas"
1212

13+
external asEventTarget: offscreenCanvas => eventTarget = "%identity"
1314
/**
1415
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
1516

src/ChannelMessagingAPI/MessagePort.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ open EventAPI
22
open ChannelMessagingAPI
33
open Prelude
44

5+
external asEventTarget: messagePort => eventTarget = "%identity"
56
/**
67
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
78

src/ClipboardAPI/Clipboard.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
open EventAPI
22
open ClipboardAPI
33

4+
external asEventTarget: clipboard => eventTarget = "%identity"
45
/**
56
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
67

src/DOMAPI/Animation.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ open DOMAPI
88
external make: (~effect: animationEffect=?, ~timeline: animationTimeline=?) => animation =
99
"Animation"
1010

11+
external asEventTarget: animation => eventTarget = "%identity"
1112
/**
1213
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
1314

src/DOMAPI/CSSStyleSheet.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ open DOMAPI
66
@new
77
external make: (~options: cssStyleSheetInit=?) => cssStyleSheet = "CSSStyleSheet"
88

9+
external asStyleSheet: cssStyleSheet => styleSheet = "%identity"
910
/**
1011
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/insertRule)
1112
*/

src/DOMAPI/CharacterData.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
open DOMAPI
22
open EventAPI
33

4+
external asNode: characterData => node = "%identity"
5+
external asEventTarget: characterData => eventTarget = "%identity"
46
/**
57
Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
68

src/DOMAPI/Comment.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ open EventAPI
77
@new
88
external make: (~data: string=?) => comment = "Comment"
99

10+
external asCharacterData: comment => characterData = "%identity"
11+
external asNode: comment => node = "%identity"
12+
external asEventTarget: comment => eventTarget = "%identity"
1013
/**
1114
Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
1215

src/DOMAPI/DOMMatrix.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ external make: (~init: string=?) => domMatrix = "DOMMatrix"
1313
@new
1414
external make2: (~init: array<float>=?) => domMatrix = "DOMMatrix"
1515

16+
external asDOMMatrixReadOnly: domMatrix => domMatrixReadOnly = "%identity"
1617
@scope("DOMMatrix")
1718
external fromMatrix: (~other: domMatrixInit=?) => domMatrixReadOnly = "fromMatrix"
1819

src/DOMAPI/DOMPoint.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ open DOMAPI
66
@new
77
external make: (~x: float=?, ~y: float=?, ~z: float=?, ~w: float=?) => domPoint = "DOMPoint"
88

9+
external asDOMPointReadOnly: domPoint => domPointReadOnly = "%identity"
910
/**
1011
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static)
1112
*/

0 commit comments

Comments
 (0)