flixi

Values

pub fn action(url: String) -> attribute.Attribute(a)

The URL to which an HTTP request will be issued.

pub fn ignore() -> attribute.Attribute(a)

Any element with this attribute on it or on an ancestor will not be processed for fx-* attributes.

pub const javascript: String

The source code for fixi.js, minified.

You can render this in your application directly, or you can get the files from this package’s priv directory.

$ l -1 priv/
fixi.js
fixi.min.js
fixi.min.js.br
fixi.min.js.gz
pub fn method(method: http.Method) -> attribute.Attribute(a)

The HTTP Method that will be used for the request, defaults to GET.

pub fn script(
  attributes: List(attribute.Attribute(a)),
) -> element.Element(a)

Create a script element the runs the fixi JavaScript.

pub fn swap(property: String) -> attribute.Attribute(a)

How the content should be swapped into the DOM, can be one of innerHTML, outerHTML, beforebegin, afterbegin, beforeend, afterend, none, or any valid property on the element (e.g. className or value).

Defaults to outerHTML.

pub fn swap_after_begin() -> attribute.Attribute(a)

Swap afterbegin.

pub fn swap_after_end() -> attribute.Attribute(a)

Swap afterend.

pub fn swap_before_begin() -> attribute.Attribute(a)

Swap beforebegin.

pub fn swap_before_end() -> attribute.Attribute(a)

Swap beforeend.

pub fn swap_inner_html() -> attribute.Attribute(a)

Swap innerHTML.

pub fn swap_none() -> attribute.Attribute(a)

Swap none.

pub fn swap_outer_html() -> attribute.Attribute(a)

Swap outerHTML.

pub fn target(selector: String) -> attribute.Attribute(a)

A CSS selector specifying where to place the response HTML in the DOM, e.g. #my-id.

Defaults to the current element.

pub fn trigger(event: String) -> attribute.Attribute(a)

The event that will trigger a request, defaults to submit for form elements, change for input-like elements & click for all other elements.

Search Document