package codecs
- Alphabetic
- By Inheritance
- codecs
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait Codec[ScalaType, DomType] extends AnyRef
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.
Deprecated Type Members
Value Members
- def AsIsCodec[V](): Codec[V, V]
- 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]
- val StringAsIsCodec: Codec[String, String]
Deprecated Value Members
- lazy val IterableAsCommaSeparatedStringCodec: Codec[Iterable[String], String]
- Annotations
- @deprecated
- Deprecated
(Since version 15.0.0-M7) Laminar no longer uses IterableAsCommaSeparatedStringCodec so I plan to remove it; if you need it, please let me know
- lazy val IterableAsSpaceSeparatedStringCodec: Codec[Iterable[String], String]
- Annotations
- @deprecated
- Deprecated
(Since version 15.0.0-M7) Laminar no longer uses IterableAsSpaceSeparatedStringCodec so I plan to remove it; if you need it, please let me know