gliew
Types
Functions
pub fn append() -> Attr(Event)
Append the innerHTML of the live mount instead of replacing it.
pub fn live_mount(mount mount: fn(a) -> Subject(b), with context: a, render render: fn(
Option(b),
) -> Node(Event)) -> Node(Event)
Creates a HTML node tree that will be mounted
and receive live updates with data on Subject(a)
returned by the mount function.
pub fn morph() -> Attr(Event)
Makes the live mount morph the diff of the innerHTML instead of replacing the whole thing.
pub fn new(port: Int, handler: fn(Request(Body)) -> Response) -> Server
Creates a configuration for a server with default layout.
pub fn on_click(node: Node(Event), do method: Method, to path: String) -> Node(
Event,
)
Attaches an on-click handler to a node by specifying the HTTP method and path to make a request to when clicked.
pub fn script() -> Node(a)
Returns script tags to put into your own layout in order for live mounts to work.
pub fn with_body(response: Response, body: String) -> Response
Sets body of a response.
pub fn with_header(response: Response, key key: String, value value: String) -> Response
Adds a header to a response.