RouterRule Class

A rule of the static routing API of the service workers (https://w3c.github.io/ServiceWorker/#dictdef-routerrule): the requests that match RouterRule.Condition are handled by RouterRule.Source (the network, the cache, or the fetch event) before the fetch event is dispatched. The rules are registered by InstallEvent.AddRoutes.

public sealed class RouterRule

Constructors

NameDescription
RouterRule()

RouterRule()

  • Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public RouterRule()

No documentation is available.

Properties

NameDescription
ConditionGets the condition of the requests handled by the rule.
SourceGets the source of the response of the requests that match the condition.

Gets the condition of the requests handled by the rule.

public required RouterCondition Condition { get; init; }

Gets the source of the response of the requests that match the condition.

public required RouterSource Source { get; init; }