How should we load "Module" JS files? A few years ago, I had modified
WApplication::require to take a
std::string const & type = std::string () that, when
You can see that it works here: https://brightlight.today/speedlines/
https://brightlight.today/speedlines/js/gameplay.js is loaded using
Wt::WApplication::require("js/gameplay.js", "module, "");.
There's no feature like that in Wt yet, apart from putting the script tag in
<head-matter> in your
That patch breaks backwards compatibility (adding an extra
std::string argument between two existing string arguments), so we can't add support for it like that.
We may consider turning
WApplication::ScriptLibrary into a public class to facilitate this, similar to how we aim to address adding the
SameSite attribute to cookies in issue #7814.