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

japgolly.scalajs.react.test.TestDomWithRoot.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta8
Show newest version
package japgolly.scalajs.react.test

import org.scalajs.dom

object TestDomWithRoot {
  def apply(r: TestReactRoot, n: dom.Node): TestDomWithRoot =
    new TestDomWithRoot {
      override type Self = TestDomWithRoot
      override protected def Self(n2: dom.Node) = TestDomWithRoot(root, n2)
      override val root = r
      override def node = n
      override def toString = s"TestDomWithRoot($node)"
    }
}

// =====================================================================================================================

trait TestDomWithRoot extends TestDom {
  override type Self <: TestDomWithRoot
  val root: TestReactRoot

  @inline def unmount(): Unit =
    root.unmount()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy