easafe / purescript-flame

Fast & simple framework for building web applications
https://flame.asafe.dev
MIT License
292 stars 10 forks source link

Make Flame.Types.Html a real type #54

Closed asvanberg closed 2 years ago

asvanberg commented 2 years ago

Having Html a it be a real type will enable traversing the hierarchy and make modifications to it.

For example;

easafe commented 2 years ago

Hello @asvanberg ,

Html used to be a regular data type, but this was changed to enable a new renderer. However, you can do all of these now easily (e.g., attributes and events are just arrays, similarly you can still use native js events on all tags of type a, use smart constructors, etc). There are also so called managed nodes that give you the actual DOM node, if you really need it.