Custom Elements
Browsers seem to be supporting custom elements more and more, and that turns out to be quite helpful for embedding JS into Elm programs.
Here is a of how to use custom elements to do some localization and internationalization.
But how do we use that in Elm?! Newer browsers allow you to create new types of DOM nodes like this:
The most important parts here are and . You need some logic like that to detect changes to the attributes you care about.
Now you can call when you want access to that kind of localized information in your .
You can check out the full version of this example here.
More Info
Docs on custom elements can be kind of confusing, but I hope this is enough for people to get started embedding simple logic for or even large React widgets if that seems like the right choice for your project.