Skip to content

lit-ui-router / SrefStatusDirective

Abstract Class: SrefStatusDirective<Params>

Defined in: packages/lit-ui-router/src/sref-active.ts:62

What srefActiveClass and srefAriaCurrent share: a target (named, or gathered from enclosed links), the router subscriptions that recompute its SrefStatus, and the push of each new value into the attribute.

render() is a function of status and the params alone. A server renderer runs it without update(), so it seeds status from the call-scoped router first; with no router in reach the value stays noChange and the attribute is left as authored.

Extends

Extended by

Type Parameters

Type Parameter
Params extends SrefTargetParams

Properties

PropertyModifierTypeDescriptionDefined in
directiveNamereadonlystringthe public function's name, for errors and warningspackages/lit-ui-router/src/sref-active.ts:97
paramspublicParams | undefinedthe last params update() sawpackages/lit-ui-router/src/sref-active.ts:73
statuspublicSrefStatus | undefinedmerged status of every target, or undefined before there is onepackages/lit-ui-router/src/sref-active.ts:75

Methods

render()

ts
abstract render(params): unknown;

Defined in: packages/lit-ui-router/src/sref-active.ts:109

the value for status and params as they stand

Parameters

ParameterType
paramsParams

Returns

unknown

Overrides

ts
AsyncDirective.render