Skip to content

lit-ui-router / SrefStatusDirective

Abstract Class: SrefStatusDirective<Params>

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

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, so a server renderer that runs it without update() gets noChange — the attribute is left as authored — rather than a crash.

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:95
paramspublicParams | undefinedthe last params update() sawpackages/lit-ui-router/src/sref-active.ts:71
statuspublicSrefStatus | undefinedmerged status of every target, or undefined before there is onepackages/lit-ui-router/src/sref-active.ts:73

Methods

render()

ts
abstract render(params): unknown;

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

the value for status and params as they stand

Parameters

ParameterType
paramsParams

Returns

unknown

Overrides

ts
AsyncDirective.render