Skip to content

lit-ui-router / SrefStatusDirective

Abstract Class: SrefStatusDirective<Params, Rendered> ​

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

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 ParameterDefault type
Params extends SrefTargetParams-
Renderedunknown

Properties ​

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

Methods ​

render() ​

ts
abstract render(params): Rendered;

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

the value for status and params as they stand

Parameters ​

ParameterType
paramsParams

Returns ​

Rendered

Overrides ​

ts
AsyncDirective.render