Hi,
I've recently migrated to Scalatags 0.3.5 and my code is not compiling anymore.
In a nutshell, custom attributes were a SortedMap before and now they are List[Seq[Modifier]].
Could you please tell me what I'm missing in the code below? Thanks a lot in advance :)
import scalatags.Text._
import scalatags.Text.all._
import scalatags.Escaping
import scalatags.Platform
import scalatags.generic
import scalatags.text
object dojo {
val `data-dojo-id` : Attr = "data-dojo-id".attr
val `data-dojo-type` : Attr = "data-dojo-type".attr
val `data-dojo-props` : Attr = "data-dojo-props".attr
object dijit {
val select = "select".dtag[form.SelectElement]("dijit/form/Select")
val combobox = "input".dtag[form.ComboBoxElement]("dijit/form/ComboBox")
object form {
class SelectElement extends dom.HTMLSelectElement
class ComboBoxElement extends dom.HTMLSelectElement
}
}
object store {
val memory = "div".dtag[MemoryElement]("dojo/store/Memory")
class MemoryElement extends dom.HTMLDivElement
}
implicit class DojoConversions(s: String) {
def dtag[T <: Platform.Base](dtype: String) = {
if (!Escaping.validTag(s))
throw new IllegalArgumentException(s"Illegal tag name: $s is not a valid XML tag name")
//----------- how do I build a List[Seq[Modifier]] ? --------------------------
val y = `data-dojo-type` := dtype
TypedTag(s, `data-dojo-type` := dtype, false)
//-----------------------------------------------------------------------------
}
}
}