Yes. In the past I've used `property "" Json.Encode.null` for this, which seemed to avoid setting a dummy attribute, but I have no idea how accidental that is and if it works for browsers other than Chrome.
On Tuesday, January 24, 2017 at 10:41:02 PM UTC-5, Mark Hamburg wrote: > > Agreed. I wanted this just the other day as well. For similar reasons, it > would also be nice to have an “official” Html.none rather than just using > Html.text “”. > > Mark > > On Jan 24, 2017, 3:51 PM -0800, OvermindDL1 <[email protected] > <javascript:>>, wrote: > > Yes, for precisely the same usage. It is much easier to swap between > something and `none` then it it to do list building with if conditions. I > made my own by using a dummy attribute name that should 'never be used' > (*cough*) of "nonenonenone". > > A side effect is the vdom checking is a little more efficient if more than > 1 set of things change at once since the overall 'shape' of the vdom does > not change. ^.^ > > > On Tuesday, January 24, 2017 at 3:21:31 PM UTC-7, Robert Lee wrote: >> >> Would anyone else find --Html.Attributes.none-- useful? >> >> none : Html.Attribute a >> >> Use cases look like the following. >> >> .... >> >> view: Model -> Html.Html Msg >> let >> onClickButton = >> case model.isClickedAlready of >> True -> >> Html.Events.onClick Submit >> >> False -> >> Html.Attributes.none >> in >> Div [onClickButton] .... >> >> ..... >> > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
