Custom Elements

On the last few pages, we have seen (1) how to start Elm programs from JavaScript, (2) how to pass data in as flags on initialization, and (3) how to send messages between Elm and JS with ports. But guess what people? There is another way to do interop!

Browsers seem to be supporting custom elements more and more, and that turns out to be quite helpful for embedding JS into Elm programs.

I am not particularly experienced with this technique yet, so I will defer to Luke. He has a lot more experience, and I think his Elm Europe talk is an excellent introduction!

I would love to provide text and examples here as well, and I hope to come back to this page in a calmer time and write it up myself. But in the meantime, I hope the community can fill the gap with blog posts!

results matching ""

    No results matching ""