Is there a way to set arbitrary attribute values for elements on a page?
More specifically, I want to set the “type” attribute on a < script > tag (created with either Html.F.script or Html.D.script) to “module” (type=module) so that I can reference 3rd party js libraries (not from any opam package) that I use in my own hand written js file that I would like to include in an eliom project. Without that I get errors at runtime in browsers complaining about functions cannot be exported except from modules. If there is a better way to accomplish referencing 3rd party js libraries (not from any opam package), please let me know too.
Regardless, I have looked and not found a way to set arbitrary attributes on elements, let alone script tags. I thought I had found it in tyxml in the string_attrib ~aname function but I could never get that to compile when I provide it with values.
Any help with either problem (referncing 3rd party js libraries or setting arbitrary attributes) would be appreciated. Thank you.