agnostic/vdom/vattr

Types

pub type Attribute(message) {
  Attribute(kind: Int, name: String, value: String)
  Property(kind: Int, name: String, value: json.Json)
  Event(
    kind: Int,
    name: String,
    handler: decode.Decoder(Handler(message)),
    include: List(String),
    prevent_default: EventBehaviour,
    stop_propagation: EventBehaviour,
    debounce: Int,
    throttle: Int,
  )
}

Constructors

  • Attribute(kind: Int, name: String, value: String)
  • Property(kind: Int, name: String, value: json.Json)
  • Event(
      kind: Int,
      name: String,
      handler: decode.Decoder(Handler(message)),
      include: List(String),
      prevent_default: EventBehaviour,
      stop_propagation: EventBehaviour,
      debounce: Int,
      throttle: Int,
    )
pub type EventBehaviour {
  Never(kind: Int)
  Possible(kind: Int)
  Always(kind: Int)
}

Constructors

  • Never(kind: Int)
  • Possible(kind: Int)
  • Always(kind: Int)
pub type Handler(message) {
  Handler(
    prevent_default: Bool,
    stop_propagation: Bool,
    message: message,
  )
}

Constructors

  • Handler(
      prevent_default: Bool,
      stop_propagation: Bool,
      message: message,
    )

Values

pub const always: EventBehaviour
pub const always_kind: Int
pub fn attribute(
  name name: String,
  vaue value: String,
) -> Attribute(message)
pub const attribute_kind: Int
pub fn compare(
  a: Attribute(message),
  b: Attribute(message),
) -> order.Order
pub fn event(
  name name: String,
  handler handler: decode.Decoder(Handler(message)),
  include include: List(String),
  prevent_default prevent_default: EventBehaviour,
  stop_propagation stop_propagation: EventBehaviour,
  debounce debounce: Int,
  throttle throttle: Int,
) -> Attribute(message)
pub const event_kind: Int
pub fn merge(
  attributes: List(Attribute(message)),
  merged: List(Attribute(message)),
) -> List(Attribute(message))
pub const never_kind: Int
pub const possible: EventBehaviour
pub const possible_kind: Int
pub fn prepare(
  attributes: List(Attribute(message)),
) -> List(Attribute(message))
pub fn property(
  name name: String,
  value value: json.Json,
) -> Attribute(message)
pub const property_kind: Int
pub fn to_json(attribute: Attribute(message)) -> json.Json
Search Document