scalatags icon indicating copy to clipboard operation
scalatags copied to clipboard

Frag should override applyTo with a default value

Open lihaoyi opened this issue 9 years ago • 0 comments

Otherwise you have to do the following to inherit from Frag:

object View extends Frag{
  val view: Frag = ???
  def render = view.render
  def applyTo(t: dom.Element) = t.appendChild(render)
}

Not the end of the world, but more annoying than it should be. applyTo is always just going to append the rendered frag to the builder element

lihaoyi avatar Dec 01 '16 13:12 lihaoyi