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 b6f5674 commit 1ebe1b0Copy full SHA for 1ebe1b0
runtime/js/jslib_js_of_ocaml.js
@@ -72,12 +72,11 @@ function caml_js_get_console() {
72
//Requires: caml_failwith
73
//Weakdef
74
function caml_xmlhttprequest_create(unit) {
75
- if (typeof globalThis.XMLHttpRequest !== "undefined") {
76
- try {
77
- return new globalThis.XMLHttpRequest();
78
- } catch (e) {}
+ try {
+ return new globalThis.XMLHttpRequest();
+ } catch {
+ caml_failwith("Cannot create a XMLHttpRequest");
79
}
80
- caml_failwith("Cannot create a XMLHttpRequest");
81
82
83
//Provides: caml_js_error_of_exception
0 commit comments