DomZipper

trait DomZipper[F[_], Dom, A, Self <: ([G[_], B] =>> DomZipper[G, Dom, B, Self])]
Companion:
object
class Object
trait Matchable
class Any
trait DomZipperBase[F, Dom, A, Self]
trait WithStore[F, Dom, A, Self]
trait Store[F, Dom, A, Self]
trait DomZippersFastAndSlow[F, Dom, A]

Value members

Abstract methods

def apply(name: String, sel: String, which: MofN): F[Self[F, A]]
def checked: F[Boolean]
def child(name: String, sel: String, which: MofN): F[Self[F, A]]
def children01: DomCollection[Self, F, Option, Dom, A]
def children01(sel: String): DomCollection[Self, F, Option, Dom, A]
def children0n: DomCollection[Self, F, Vector, Dom, A]
def children0n(sel: String): DomCollection[Self, F, Vector, Dom, A]
def children1n: DomCollection[Self, F, Vector, Dom, A]
def children1n(sel: String): DomCollection[Self, F, Vector, Dom, A]
def classes: Set[String]
def collect01(sel: String): DomCollection[Self, F, Option, Dom, A]
def collect0n(sel: String): DomCollection[Self, F, Vector, Dom, A]
def collect1n(sel: String): DomCollection[Self, F, Vector, Dom, A]
def describe: String
def dom: Dom
def duplicate: Self[F, Self[F, A]]
def enrichErr(msg: String): String
def extend[B](f: Self[F, A] => B): Self[F, B]
def extract: A
def getAttribute(name: String): Option[String]
def innerText: String
def isCapable(c: Capability): Boolean
def map[B](f: A => B): Self[F, B]
def matches(css: String): F[Boolean]
def parent: F[Self[F, A]]
def scrubHtml(f: HtmlScrub): Self[F, A]
def tagName: String
def unmap: Self[F, Dom]
def value: F[String]

Concrete methods

final def apply(sel: String): F[Self[F, A]]
final def apply(sel: String, which: MofN): F[Self[F, A]]
final def apply(name: String, sel: String): F[Self[F, A]]
final def child(sel: String): F[Self[F, A]]
final def child(which: MofN): F[Self[F, A]]
final def child(sel: String, which: MofN): F[Self[F, A]]
final def child(name: String, sel: String): F[Self[F, A]]
def count(sel: String): Int
final def editables01: DomCollection[Self, F, Option, Dom, A]
final def editables0n: DomCollection[Self, F, Vector, Dom, A]
final def editables1n: DomCollection[Self, F, Vector, Dom, A]
final def ensureConsistency[B](f: DomZipper[F, Dom, A, Self] => B): F[B]

To ensure that DOM doesn't change in the middle of an observation, replace code like...

To ensure that DOM doesn't change in the middle of an observation, replace code like...

 new Obs($)

...with code like...

 $.ensureConsistency(new Obs(_))
def exists(sel: String): Boolean
def exists(sel: String, suchThat: Self[F, A] => Boolean): Boolean
def findSelfOrChildWithAttribute(attr: String): F[Option[Self[F, A]]]
final def innerHTML: String
final def needAttribute(name: String): F[String]
final def outerHTML: String
final def prepare[B](f: Self[F, A] => B): () => B
final def scrubHtml(f: String => String): Self[F, A]
def selectedOption: F[DomCollection[Self, F, Option, Dom, A]]

The currently selected option in a <select> dropdown.

The currently selected option in a <select> dropdown.

def selectedOptionText: F[Option[String]]

The text value of the currently selected option in a <select> dropdown.

The text value of the currently selected option in a <select> dropdown.

def startConsistencyCheck(): () => F[Unit]

To ensure that DOM doesn't change in the middle of an observation, use this pattern:

To ensure that DOM doesn't change in the middle of an observation, use this pattern:

 class Obs($: DomZipper) {

   // Before making any observations...
   private val checkConsistency = $.startConsistencyCheck()

   // ... obs here ...

   // After making all observations...
   checkConsistency()
 }

(This assumes you're using ErrorHandler.Throw)

Deprecated methods

@deprecated("Use .describe", "2.3.0")
final def describeLoc: String
Deprecated