I have a project using Play Framework as a server and the client written in Scala.js and inserted into the page delivered via scalajs-scripts. There also is a shared sub-project used by both server and client.
Now I want the client to read a value that is dynamically inserted by the server when the page is served. I don't want to do AJAX or recompiling the client.
I'm thinking of using another script tag to define a global variable with value set dynamically by Play and then let the client read it from the global scope, but it is a bit hacky. Is there a better solution? Thanks!