We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22ec115 commit db8eeaeCopy full SHA for db8eeae
lib/lwt/lwt_jsonp.ml
@@ -38,10 +38,13 @@ let raw_call name uri error_cb user_cb =
38
Js.Opt.iter script##.parentNode (fun parent -> Dom.removeChild parent script)
39
in
40
let executed = ref false in
41
- Js.Unsafe.set Dom_html.window (Js.string name) (fun x ->
42
- executed := true;
43
- finalize ();
44
- user_cb x);
+ Js.Unsafe.set
+ Dom_html.window
+ (Js.string name)
+ (Js.wrap_callback (fun x ->
45
+ executed := true;
46
+ finalize ();
47
+ user_cb x));
48
script##.src := Js.string uri;
49
script##._type := Js.string "text/javascript";
50
script##.async := Js._true;
0 commit comments