agda/agda-frp-js — Issue #2: non-behavior DOM
Author: larrytheliquid
Created: 2012-01-22 02:15:53+00:00
State: open

@asajeffrey
I might be missing something obvious, but it seems like one either needs to be able to construct the dom outside of behaviors (rather than postulating Beh DOM's directly), or have a "join" operator:

This gist contrasts building a string behavior from a list with trying to accomplish the same thing by rendering the list as a dom of li-tags. You get into trouble because what you are folding over is already a dom, so mapping it will wrap it again. Solutions could be the ability to create non-behavior dom values, or a "join" operator to flatten the wrapping.
Would either one of these be ok, or is there something vital you are trying to protect by not allowing non-behavior dom values (e.g. maybe there is a conflict with the way you are connecting to dom events)?
https://gist.github.com/2b949aeecdb936220810