DocShell.Presentation.Renderer.Capability (DocShell v0.5.0)

Copy Markdown View Source

Describes the states a renderer can provide for one feature.

states records whether output contains a semantic fallback, a local browser enhancement, or a connected live experience. runtime records only what the served result needs (:browser_js or :live_transport), not tools used while building assets. Static admission can therefore reject live-only output without treating JavaScript enhancement as a server dependency.

Summary

Types

t()

A closed capability declaration.

Functions

Validates feature states and runtime requirements.

Types

t()

@type t() :: %DocShell.Presentation.Renderer.Capability{
  runtime: [:browser_js | :live_transport],
  states: [:fallback | :enhanced | :connected]
}

A closed capability declaration.

Functions

validate(capability)

@spec validate(t()) :: :ok | {:error, term()}

Validates feature states and runtime requirements.