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"
2727external atob : (window , string ) => string = "atob"
2828
2929/**
30+ Executes a function after a delay given in milliseconds expires.
31+
3032[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
3133*/
3234@send
33- external setTimeout : (window , ~handler : string , ~timeout : int = ?) => int = "setTimeout"
35+ external setTimeout : (window , ~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
3436
3537/**
38+ Evaluates and executes raw JavaScript code after a delay given in milliseconds
39+ expires. Use of this function is not recommended.
40+
3641[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
3742*/
3843@send
39- external setTimeout2 : (window , ~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
44+ external setTimeout_unsafe : (window , ~code : string , ~timeout : int = ?) => int = "setTimeout"
4045
4146/**
47+ Cancels the execution of a timeout created with setTimeout.
48+
4249[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
4350*/
4451@send
Original file line number Diff line number Diff line change @@ -260,16 +260,23 @@ external btoa: string => string = "btoa"
260260external atob : string => string = "atob"
261261
262262/**
263+ Executes a function after a delay given in milliseconds expires.
264+
263265[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
264266*/
265- external setTimeout : (~handler : string , ~timeout : int = ?) => int = "setTimeout"
267+ external setTimeout : (~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
266268
267269/**
270+ Evaluates and executes raw JavaScript code after a delay given in milliseconds
271+ expires. Use of this function is not recommended.
272+
268273[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
269274*/
270- external setTimeout2 : (~handler : unit => unit , ~timeout : int = ?) => int = "setTimeout"
275+ external setTimeout_unsafe : (~code : string , ~timeout : int = ?) => int = "setTimeout"
271276
272277/**
278+ Cancels the execution of a timeout created with setTimeout.
279+
273280[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
274281*/
275282external clearTimeout : int => unit = "clearTimeout"
You can’t perform that action at this time.
0 commit comments