Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frag should override applyTo with a default value #148

Open
lihaoyi opened this issue Dec 1, 2016 · 0 comments
Open

Frag should override applyTo with a default value #148

lihaoyi opened this issue Dec 1, 2016 · 0 comments

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Dec 1, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant