com.raquo.domtypes.common

Type members

Classlikes

case class AttrDef(tagType: TagType, scalaName: String, scalaAliases: List[String], domName: String, namespace: Option[String], scalaValueType: String, codec: String, commentLines: List[String], docUrls: List[String]) extends KeyDef

This type represents an HTML or SVG element attribute.

This type represents an HTML or SVG element attribute.

Value parameters:
codec
  • Codec needed to convert between scalaValueType and String
commentLines
  • Scaladoc comment lines for this key
docUrls
  • Scaladoc documentation URLs for this key
domName
implName
  • Method name used to create this key from the old SDT codebase
namespace
  • Defined for certain SVG attributes
scalaAliases
  • Aliases that should be defined linking to the main scalaName
scalaName
  • Suggested name of this attribute in Scala. The name is chosen to - match Scala naming style (e.g. camelCase) - avoid name collisions between different types of keys (e.g. title tag vs title attribute) - avoid using up popular names for unpopular keys
scalaValueType
  • Type of values you can write to this attribute in Scala Note: in the DOM, the attribute's value is always String.
tagType
  • HTML or SVG
case class ComplexKeyDef(tagType: TagType, scalaName: String, domAttrName: String, domPropName: Option[String], commentLines: List[String], docUrls: List[String]) extends KeyDef
case class EventPropDef(scalaName: String, scalaAliases: List[String], domName: String, scalaJsEventType: String, javascriptEventType: String, commentLines: List[String], docUrls: List[String]) extends KeyDef

This type represent a specific type of DOM element events, e.g. "click" or "scroll".

This type represent a specific type of DOM element events, e.g. "click" or "scroll".

Value parameters:
commentLines
  • Scaladoc comment lines for this key
docUrls
  • Scaladoc documentation URLs for this key
domName
  • Native event name in the DOM, e.g. "click"
javascriptEventType
  • Type of corresponding event in raw Javascript
scalaAliases
  • Aliases that should be defined linking to the main scalaName
scalaJsEventType
scalaName
  • Suggested name of this prop in Scala. The name is chosen to - match Scala naming style (e.g. camelCase) and intended use (event hook names in UI libraries) - avoid name collisions between different types of keys (e.g. title tag vs title attribute) - avoid using up popular names for unpopular keys
object HtmlTagType extends TagType
trait KeyDef
case class PropDef(scalaName: String, scalaAliases: List[String], domName: String, scalaValueType: String, domValueType: String, codec: String, commentLines: List[String], docUrls: List[String]) extends KeyDef

This type represents an HTML element property.

This type represents an HTML element property.

Value parameters:
codec
  • Codec needed to convert between scalaValueType and domValueType
commentLines
  • Scaladoc comment lines for this key
docUrls
  • Scaladoc documentation URLs for this key
domName
  • Native attribute name in the DOM.
domValueType
  • Type of values that this property holds in the DOM
scalaAliases
  • Aliases that should be defined linking to the main scalaName
scalaName
  • Suggested name of this prop in Scala. The name is chosen to - match Scala naming style (e.g. camelCase) - avoid name collisions between different types of keys (e.g. title tag vs title attribute) - avoid using up popular names for unpopular keys
scalaValueType
  • Type of values you can write to this attribute in Scala
case class ReflectedHtmlAttrDef(scalaName: String, domAttrName: String, domPropName: String, scalaValueType: String, domPropValueType: String, attrCodec: String, propCodec: String, commentLines: List[String], docUrls: List[String]) extends KeyDef

This type represents a reflected attribute – that is, a property of an HTML element that is linked to a corresponding HTML attribute, such that their value matches, and writing to one updates the other as well. Example: id property / "id" attribute.

This type represents a reflected attribute – that is, a property of an HTML element that is linked to a corresponding HTML attribute, such that their value matches, and writing to one updates the other as well. Example: id property / "id" attribute.

Your library can choose to operate on these keys using either the props DOM API (element.id = "newId") or the attributes DOM API (element.setAttribute("id", "newId"). The former has better performance.

Value parameters:
attrCodec
  • Codec needed to convert between scalaValueType and String
commentLines
  • Scaladoc comment lines for this key
docUrls
  • Scaladoc documentation URLs for this key
domAttrName
  • Native attribute name in the DOM.
domPropName
  • Native property name in the DOM. Note: this can be different from domAttrName. For example, value attribute matches defaultValue property.
domPropValueType
  • Type of values you can write to this property in the DOM Note: in contrast to element properties, in the DOM, the attributes' values are always of type String.
propCodec
  • Codec needed to convert between scalaValueType and domPropValueType
scalaName
  • Suggested name of this attribute in Scala. The name is chosen to - match Scala naming style (e.g. camelCase) - avoid name collisions between different types of keys (e.g. title tag vs title attribute) - avoid using up popular names for unpopular keys
scalaValueType
  • Type of values you can write to this reflected attribute in Scala
case class StyleKeywordDef(scalaName: String, scalaAliases: List[String], domName: String, isOverride: Boolean, commentLines: List[String], docUrls: List[String]) extends KeyDef
case class StylePropDef(scalaName: String, scalaAliases: List[String], domName: String, valueType: String, valueTraits: List[String], valueUnits: List[String], implName: String, commentLines: List[String], docUrls: List[String]) extends KeyDef

This type represents a CSS style property, such as "background" or "border-color"

This type represents a CSS style property, such as "background" or "border-color"

Value parameters:
commentLines
  • Scaladoc comment lines for this key
docUrls
  • Scaladoc documentation URLs for this key
domName
  • Native style property name in the DOM.
implName
  • Method name used to create this key from the old SDT codebase
scalaAliases
  • Aliases that should be defined linking to the main scalaName
scalaName
  • Suggested name of this prop in Scala. The name is chosen to - match Scala naming style (e.g. camelCase) - avoid name collisions between different types of keys (e.g. title tag vs title attribute) - avoid using up popular names for unpopular keys
valueTraits
  • List of style traits that provide additional information about keywords and units that can be used for this property. See StyleTraitDef
valueType
  • Type of values you can write to this attribute in Scala Note: in addition to this type, you can always write String into any style prop
case class StyleTraitDef(scalaName: String, extendsTraits: List[String], extendsUnits: List[String], keywordDefGroups: List[(String, List[StyleKeywordDef])]) extends KeyDef

This type represents a set of keywords ("block", "black", etc.) and units ("px", "ms", etc.) that can be used with a particular CSS style property.

This type represents a set of keywords ("block", "black", etc.) and units ("px", "ms", etc.) that can be used with a particular CSS style property.

Value parameters:
extendsTraits
  • scalaName-s of StyleTraitDef-s that this trait extends
extendsUnits
  • list of types of units that form valid values for style properties extending this trait. #TODO
keywordDefGroups
  • list of keywords that are valid values for style properties extending this trait. See StyleKeywordDef - It's grouped by a comment string that will appear on top of the first keyword in the group, e.g. see the "display" keywords.
scalaName
  • suggested core name for this trait.
object SvgTagType extends TagType
case class TagDef(tagType: TagType, scalaName: String, scalaAliases: List[String], domName: String, isVoid: Boolean, scalaJsElementTypeAlias: String, javascriptElementType: String, commentLines: List[String], docUrls: List[String]) extends KeyDef

This type represents an HTML or SVG tag, such as div or input.

This type represents an HTML or SVG tag, such as div or input.

Value parameters:
commentLines
  • Scaladoc comment lines for this key
docUrls
  • Scaladoc documentation URLs for this key
domName
  • Native tag name in the DOM
isVoid
  • If true, elements of this type can have no children
javascriptElementType
  • Type of corresponding elements in raw Javascript
scalaAliases
  • Aliases that should be defined linking to the main scalaName
scalaJsElementTypeAlias
scalaName
  • Suggested name of this tag in Scala. The name is chosen to - match Scala naming style (e.g. camelCase) - avoid name collisions between different types of keys (e.g. title tag vs title attribute) - avoid using up popular names for unpopular keys
tagType
  • HTML or SVG
trait TagType