Skip to content

Commit f5ca657

Browse files
committed
Add inherited methods to modules
1 parent 1af4f51 commit f5ca657

File tree

139 files changed

+46057
-33
lines changed

Some content is hidden

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

139 files changed

+46057
-33
lines changed

src/CSSFontLoadingAPI/FontFaceSet.res

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,113 @@
1+
open EventAPI
12
open CSSFontLoadingAPI
23

4+
/**
5+
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.
6+
7+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
8+
9+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
10+
11+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
12+
13+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
14+
15+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
16+
17+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
18+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
19+
*/
20+
@send
21+
external addEventListener: (fontFaceSet, eventType, eventListener<eventType>) => unit =
22+
"addEventListener"
23+
24+
/**
25+
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.
26+
27+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
28+
29+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
30+
31+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
32+
33+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
34+
35+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
36+
37+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
38+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
39+
*/
40+
@send
41+
external addEventListenerWithOptions: (
42+
fontFaceSet,
43+
eventType,
44+
eventListener<eventType>,
45+
addEventListenerOptions,
46+
) => unit = "addEventListener"
47+
48+
/**
49+
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.
50+
51+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
52+
53+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
54+
55+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
56+
57+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
58+
59+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
60+
61+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
62+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
63+
*/
64+
@send
65+
external addEventListenerWithUseCapture: (
66+
fontFaceSet,
67+
eventType,
68+
eventListener<eventType>,
69+
bool,
70+
) => unit = "addEventListener"
71+
72+
/**
73+
Removes the event listener in target's event listener list with the same type, callback, and options.
74+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
75+
*/
76+
@send
77+
external removeEventListener: (fontFaceSet, eventType, eventListener<eventType>) => unit =
78+
"addEventListener"
79+
80+
/**
81+
Removes the event listener in target's event listener list with the same type, callback, and options.
82+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
83+
*/
84+
@send
85+
external removeEventListenerWithOptions: (
86+
fontFaceSet,
87+
eventType,
88+
eventListener<eventType>,
89+
eventListenerOptions,
90+
) => unit = "addEventListener"
91+
92+
/**
93+
Removes the event listener in target's event listener list with the same type, callback, and options.
94+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
95+
*/
96+
@send
97+
external removeEventListenerWithUseCapture: (
98+
fontFaceSet,
99+
eventType,
100+
eventListener<eventType>,
101+
bool,
102+
) => unit = "addEventListener"
103+
104+
/**
105+
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
106+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
107+
*/
108+
@send
109+
external dispatchEvent: (fontFaceSet, event) => bool = "dispatchEvent"
110+
3111
/**
4112
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/add)
5113
*/

src/CanvasAPI/OffscreenCanvas.res

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
open DOMAPI
1+
open EventAPI
22
open CanvasAPI
3+
open DOMAPI
34
open Prelude
45
open FileAPI
56

@@ -8,6 +9,113 @@ open FileAPI
89
*/
910
@new
1011
external make: (int, int) => offscreenCanvas = "OffscreenCanvas"
12+
/**
13+
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.
14+
15+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
16+
17+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
18+
19+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
20+
21+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
22+
23+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
24+
25+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
26+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
27+
*/
28+
@send
29+
external addEventListener: (offscreenCanvas, eventType, eventListener<eventType>) => unit =
30+
"addEventListener"
31+
32+
/**
33+
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.
34+
35+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
36+
37+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
38+
39+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
40+
41+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
42+
43+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
44+
45+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
46+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
47+
*/
48+
@send
49+
external addEventListenerWithOptions: (
50+
offscreenCanvas,
51+
eventType,
52+
eventListener<eventType>,
53+
addEventListenerOptions,
54+
) => unit = "addEventListener"
55+
56+
/**
57+
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.
58+
59+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
60+
61+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
62+
63+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
64+
65+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
66+
67+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
68+
69+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
70+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
71+
*/
72+
@send
73+
external addEventListenerWithUseCapture: (
74+
offscreenCanvas,
75+
eventType,
76+
eventListener<eventType>,
77+
bool,
78+
) => unit = "addEventListener"
79+
80+
/**
81+
Removes the event listener in target's event listener list with the same type, callback, and options.
82+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
83+
*/
84+
@send
85+
external removeEventListener: (offscreenCanvas, eventType, eventListener<eventType>) => unit =
86+
"addEventListener"
87+
88+
/**
89+
Removes the event listener in target's event listener list with the same type, callback, and options.
90+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
91+
*/
92+
@send
93+
external removeEventListenerWithOptions: (
94+
offscreenCanvas,
95+
eventType,
96+
eventListener<eventType>,
97+
eventListenerOptions,
98+
) => unit = "addEventListener"
99+
100+
/**
101+
Removes the event listener in target's event listener list with the same type, callback, and options.
102+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
103+
*/
104+
@send
105+
external removeEventListenerWithUseCapture: (
106+
offscreenCanvas,
107+
eventType,
108+
eventListener<eventType>,
109+
bool,
110+
) => unit = "addEventListener"
111+
112+
/**
113+
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
114+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
115+
*/
116+
@send
117+
external dispatchEvent: (offscreenCanvas, event) => bool = "dispatchEvent"
118+
11119
/**
12120
Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
13121

src/ChannelMessagingAPI/MessagePort.res

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,113 @@
1-
open Prelude
1+
open EventAPI
22
open ChannelMessagingAPI
3+
open Prelude
4+
5+
/**
6+
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.
7+
8+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
9+
10+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
11+
12+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
13+
14+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
15+
16+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
17+
18+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
19+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
20+
*/
21+
@send
22+
external addEventListener: (messagePort, eventType, eventListener<eventType>) => unit =
23+
"addEventListener"
24+
25+
/**
26+
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.
27+
28+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
29+
30+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
31+
32+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
33+
34+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
35+
36+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
37+
38+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
39+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
40+
*/
41+
@send
42+
external addEventListenerWithOptions: (
43+
messagePort,
44+
eventType,
45+
eventListener<eventType>,
46+
addEventListenerOptions,
47+
) => unit = "addEventListener"
48+
49+
/**
50+
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.
51+
52+
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
53+
54+
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
55+
56+
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
57+
58+
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
59+
60+
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
61+
62+
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
63+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
64+
*/
65+
@send
66+
external addEventListenerWithUseCapture: (
67+
messagePort,
68+
eventType,
69+
eventListener<eventType>,
70+
bool,
71+
) => unit = "addEventListener"
72+
73+
/**
74+
Removes the event listener in target's event listener list with the same type, callback, and options.
75+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
76+
*/
77+
@send
78+
external removeEventListener: (messagePort, eventType, eventListener<eventType>) => unit =
79+
"addEventListener"
80+
81+
/**
82+
Removes the event listener in target's event listener list with the same type, callback, and options.
83+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
84+
*/
85+
@send
86+
external removeEventListenerWithOptions: (
87+
messagePort,
88+
eventType,
89+
eventListener<eventType>,
90+
eventListenerOptions,
91+
) => unit = "addEventListener"
92+
93+
/**
94+
Removes the event listener in target's event listener list with the same type, callback, and options.
95+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
96+
*/
97+
@send
98+
external removeEventListenerWithUseCapture: (
99+
messagePort,
100+
eventType,
101+
eventListener<eventType>,
102+
bool,
103+
) => unit = "addEventListener"
104+
105+
/**
106+
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
107+
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
108+
*/
109+
@send
110+
external dispatchEvent: (messagePort, event) => bool = "dispatchEvent"
3111

4112
/**
5113
Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.

0 commit comments

Comments
 (0)