These are chat archives for ThoughtWorksInc/Binding.scala

29th
Sep 2016
Michele Sciabarra
@sciabarra
Sep 29 2016 09:36
is there any way to add an attribute without value?
<video controls ...>
because:

WRONG

<video controls="true" ...>

杨博 (Yang Bo)
@Atry
Sep 29 2016 09:37
Try controls={true}
Michele Sciabarra
@sciabarra
Sep 29 2016 09:38
so if I put controls={flag.bind} and set flag := false
the attribute disappear?
杨博 (Yang Bo)
@Atry
Sep 29 2016 09:38
Yep
Michele Sciabarra
@sciabarra
Sep 29 2016 09:39
let me guess, if I do something={s.bind} with s : String
setting s := null will remove the attribute?
s: Var[String] I mean
杨博 (Yang Bo)
@Atry
Sep 29 2016 09:42
Usually s := "" for most of DHTML properties.
Michele Sciabarra
@sciabarra
Sep 29 2016 09:43
I guess the behavior comes from scalajs dom api