com.raquo.domtestutils.codecs

Members list

Type members

Classlikes

trait Codec[ScalaType, DomType]

This trait represents a way to encode and decode HTML attribute or DOM property values.

This trait represents a way to encode and decode HTML attribute or DOM property values.

It is needed because attributes encode all values as strings regardless of their type, and then there are also multiple ways to encode e.g. boolean values. Some attributes encode those as "true" / "false" strings, others as presence or absence of the element, and yet others use "yes" / "no" or "on" / "off" strings, and properties encode booleans as actual booleans.

Scala DOM Types hides all this mess from you using codecs. All those pseudo-boolean attributes would be simply Attr[Boolean](name, codec) in your code.

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def AsIsCodec[V](): Codec[V, V]

Concrete fields

val BooleanAsAttrPresenceCodec: Codec[Boolean, String]
val BooleanAsIsCodec: Codec[Boolean, Boolean]
lazy val BooleanAsOnOffStringCodec: Codec[Boolean, String]
lazy val BooleanAsTrueFalseStringCodec: Codec[Boolean, String]
lazy val BooleanAsYesNoStringCodec: Codec[Boolean, String]
lazy val DoubleAsIsCodec: Codec[Double, Double]
lazy val DoubleAsStringCodec: Codec[Double, String]
val IntAsIsCodec: Codec[Int, Int]
lazy val IntAsStringCodec: Codec[Int, String]
lazy val IterableAsSpaceSeparatedStringCodec: Codec[Iterable[String], String]
val StringAsIsCodec: Codec[String, String]