Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
t

LiveRootLayout

trait LiveRootLayout[-A, -Ctx]

Declaratively renders and identifies the outer document shell.

Defined by scalive.LiveRootLayout. View source (scalive/api/src/scalive/routing/LiveLayouts.scala:66-130)

Methods3

forContext

def forContext[NewContext](select: NewContext => Ctx): LiveRootLayout[A, NewContext]

Adapts this document shell to another context type by selecting the context it needs.

Key and render apply the selector independently, so it must be pure and deterministic. Parameters, request, URL, content, and page title are forwarded unchanged. This does not change the route or session context or make document-root attributes reactive. The identity root stays unchanged and does not evaluate the selector because it consumes no context.

Defined by scalive.LiveRootLayout.forContext. View source (scalive/api/src/scalive/routing/LiveLayouts.scala:102-129)

key

def key(context: LiveRootLayoutContext[A, Ctx]): String

Defined by scalive.LiveRootLayout.key. View source (scalive/api/src/scalive/routing/LiveLayouts.scala:67-67)

render

def render[Msg](content: HtmlElement[Msg], pageTitle: Option[String], context: LiveRootLayoutContext[A, Ctx]): HtmlElement[Msg]

Defined by scalive.LiveRootLayout.render. View source (scalive/api/src/scalive/routing/LiveLayouts.scala:68-72)