3 ms·
Turning Html Msg types into actual Dom nodes means hooking up the event handlers so that they call update with the Msg the event handler is given. Browser.sandb
by hawkice 8y ago
Turning Html Msg types into actual Dom nodes means hooking up the event handlers so that they call update with the Msg the event handler is given. Browser.sandbox is building the Dom nodes and has the update function.
- Touche 8y agoYeah, I got that far. How does it know what it should turn into an Update handler though?
- hawkice 8y agoYou pass it the update function, the one function handles all updates. Typically, you'll have a case statement in that function to dispatch it out to something more specific.
- neoberg 8y agoBrowser.sandbox, Browser.application etc. are your app's runtimes. (Or they are the doors to the runtime) Subscriptions or DOM elements can generate Msgs and every Msg causes an update cycle.