Issho.Binding (Issho v0.1.0)

Copy Markdown View Source

What a component brings to Issho: its engine (Issho.Engine) and its place format (Issho.Place). The browser's half of a binding brings the rest: drawing places, and reading and applying a view for following.

# In Kotoba, compiled only when Issho is present:
if Code.ensure_loaded?(Issho.Binding) do
  defmodule Kotoba.Issho do
    use Issho.Binding, engine: Kotoba.Issho.Engine, place: Kotoba.Issho.Place
  end
end

A binding module is what a policy names as a document's engine (%{engine: Kotoba.Issho, ...}): it delegates the engine's callbacks, and place/0 names the place module.