Is your feature request related to a problem? Please describe.
My application stopped working for a user after a js_of_ocaml upgrade. This user has an old iPhone (ISTR 8, released in 2017) with iOS 16.7.5, and is using the built-in Safari. I have no idea how to debug this.
Out of curiosity, I tried said application in Firefox ESR 45.9.0 in an old Debian 9.0.1 LiveCD (released in 2017) and I see the same behaviour. Looking at the JavaScript console, the problem seems to be due to the use of ES6 classes, which is a recent new "feature".
Unrelatedly, code generated by js_of_ocaml unconditionally uses TextDecoder, which is not supported in quickjs.
Describe the solution you'd like
I am not against using new JavaScript features, but the situations described above are very frustrating. It would be nice if js_of_ocaml-generated code could (auto-)detect features before using them. I don't know how feasible it is, though.
Describe alternatives you've considered
Maybe an alternative solution could be to provide a stub that would probe required features from the runtime at loading time and somehow expose the missing ones so that the application has a chance to give a meaningful error message to the user.
Is your feature request related to a problem? Please describe.
My application stopped working for a user after a js_of_ocaml upgrade. This user has an old iPhone (ISTR 8, released in 2017) with iOS 16.7.5, and is using the built-in Safari. I have no idea how to debug this.
Out of curiosity, I tried said application in Firefox ESR 45.9.0 in an old Debian 9.0.1 LiveCD (released in 2017) and I see the same behaviour. Looking at the JavaScript console, the problem seems to be due to the use of ES6 classes, which is a recent new "feature".
Unrelatedly, code generated by js_of_ocaml unconditionally uses TextDecoder, which is not supported in quickjs.
Describe the solution you'd like
I am not against using new JavaScript features, but the situations described above are very frustrating. It would be nice if js_of_ocaml-generated code could (auto-)detect features before using them. I don't know how feasible it is, though.
Describe alternatives you've considered
Maybe an alternative solution could be to provide a stub that would probe required features from the runtime at loading time and somehow expose the missing ones so that the application has a chance to give a meaningful error message to the user.