File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -27,18 +27,25 @@ external btoa: (window, string) => string = "btoa"
27
27
external atob : (window , string ) => string = "atob"
28
28
29
29
/**
30
+ Executes a function after a delay given in milliseconds expires.
31
+
30
32
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
31
33
*/
32
34
@send
33
- external setTimeout : (window , ~handler : string , ~timeout : int = ?) => int = "setTimeout"
35
+ external setTimeout : (window , ~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
34
36
35
37
/**
38
+ Evaluates and executes raw JavaScript code after a delay given in milliseconds
39
+ expires. Use of this function is not recommended.
40
+
36
41
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
37
42
*/
38
43
@send
39
- external setTimeout2 : (window , ~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
44
+ external setTimeout_unsafe : (window , ~code : string , ~timeout : int = ?) => int = "setTimeout"
40
45
41
46
/**
47
+ Cancels the execution of a timeout created with setTimeout.
48
+
42
49
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
43
50
*/
44
51
@send
Original file line number Diff line number Diff line change @@ -260,16 +260,23 @@ external btoa: string => string = "btoa"
260
260
external atob : string => string = "atob"
261
261
262
262
/**
263
+ Executes a function after a delay given in milliseconds expires.
264
+
263
265
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
264
266
*/
265
- external setTimeout : (~handler : string , ~timeout : int = ?) => int = "setTimeout"
267
+ external setTimeout : (~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
266
268
267
269
/**
270
+ Evaluates and executes raw JavaScript code after a delay given in milliseconds
271
+ expires. Use of this function is not recommended.
272
+
268
273
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
269
274
*/
270
- external setTimeout2 : (~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
275
+ external setTimeout_unsafe : (~code : string , ~timeout : int = ?) => int = "setTimeout"
271
276
272
277
/**
278
+ Cancels the execution of a timeout created with setTimeout.
279
+
273
280
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
274
281
*/
275
282
external clearTimeout : int => unit = "clearTimeout"
You can’t perform that action at this time.
0 commit comments