StarView.Template.Patch (star_view v0.7.0)

Copy Markdown View Source

One element patch produced by StarView.Template.diff/2.

selector targets an element that exists in the previous render and elements is its new outer HTML. Send it with StarView.Elements.patch/3:

StarView.Elements.patch(conn, patch.elements, StarView.Template.Patch.opts(patch))

Summary

Functions

Returns StarView.Elements.patch/3 options for the patch.

Types

t()

@type t() :: %StarView.Template.Patch{
  elements: String.t(),
  mode: :outer,
  namespace: :html | :svg | :mathml,
  selector: String.t()
}

Functions

opts(patch)

@spec opts(t()) :: keyword()

Returns StarView.Elements.patch/3 options for the patch.