Re: [elm-discuss] Re: Elm as templating engine
Yap, that's the route I took. If you don't hear back from me, it means Google has not complained :} -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [elm-discuss] Re: Elm as templating engine
On Sun, Sep 3, 2017 at 11:07 AM, Birowsky wrote: > Unfortunately, it just adds `=""`. You can't see it in the dev tools > because the browser strips it away. > Fortunately that is OK as it is implicitly equivalent to what you want: http://w3c.github.io/html/infrastructure.html#sec-boolean-attributes (see the first Note of the section) -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] Re: Elm as templating engine
On Sunday, September 3, 2017 at 12:18:26 AM UTC+1, Birowsky wrote: > > Trying to use elm as a templating engine for AMP pages. But they have > specific requirements where I need to specify attributes without values. Is > that possible with some elm construct? > > https://www.ampproject.org/docs/tutorials/create/basic_markup > > for an example: > > amp = > boolProperty "⚡" True > > > creates `⚡="true"` instead of just the `⚡` > I know its horrible, but the only way I can think of to do it is to use Html.text: Html.text "" Valueless attributes do not seem to be allowed by the Elm virtual DOM code, even though they can be valid Html: https://github.com/elm-lang/virtual-dom/blob/master/src/VirtualDom.elm#L159 -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] Re: Elm as templating engine
Unfortunately, it just adds `=""`. You can't see it in the dev tools because the browser strips it away. Now, while the validation passes with empty string as a value, what frightens me, is that the AMP docs state that the online validator is not a complete validation and some errors would surface only after google crawls the content. I swear I read it somewhere in the official docs, I'll update when I find it :} -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] Re: Elm as templating engine
You need to use `attribute` with an empty string as value. https://ellie-app.com/4ckwSKX7YKGa1/0 On Sunday, September 3, 2017 at 1:18:26 AM UTC+2, Birowsky wrote: > > Trying to use elm as a templating engine for AMP pages. But they have > specific requirements where I need to specify attributes without values. Is > that possible with some elm construct? > > https://www.ampproject.org/docs/tutorials/create/basic_markup > > for an example: > > amp = > boolProperty "⚡" True > > > creates `⚡="true"` instead of just the `⚡` > -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.