All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.raquo.laminar.receivers.ChildReceiver.scala Maven / Gradle / Ivy

The newest version!
package com.raquo.laminar.receivers

import com.raquo.airstream.core.Observable
import com.raquo.laminar.nodes.ReactiveElement
import com.raquo.laminar.setters.ChildSetter
import com.raquo.laminar.setters.ChildrenSetter.Child
import org.scalajs.dom

class ChildReceiver(element: ReactiveElement[dom.Element]) {

  def <--($node: Observable[Child]): Unit = {
    (ChildReceiver <-- $node)(element)
  }
}

object ChildReceiver {

  val maybe: MaybeChildReceiver.type = MaybeChildReceiver

  val text: TextChildReceiver.type = TextChildReceiver

  def <--($node: Observable[Child]): ChildSetter = {
    new ChildSetter($node)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy