Wocart

@wocart/theme v4.1.0


@wocart/theme / index / resolveSurfaceDocument

Function: resolveSurfaceDocument()

resolveSurfaceDocument(theme, surface, saved, scope?): SurfaceDocument

The page a surface or area renders: the saved document when this theme can render it, else the theme's default (SurfaceSpec.document or AreaSpec.document, or an empty page). A saved document that names another theme, or whose sections this catalog knows none of, renders the default — a theme switch must not leave an empty page. A deliberately emptied document renders empty. The result is completed (completePage), so required and fixed blocks render whatever was saved.

Parameters

theme

ThemeDefinition

surface

string

saved

unknown

scope?

ResolutionScope

Returns

SurfaceDocument