RouterCondition Class
The condition of a RouterRule (https://w3c.github.io/ServiceWorker/#dictdef-routercondition): a request matches when it matches all the members that are present. RouterCondition.Or and RouterCondition.Not cannot be combined with the other members. A null member is not present.
public sealed class RouterConditionConstructors
| Name | Description |
|---|---|
| RouterCondition() |
RouterCondition()
public RouterCondition()No documentation is available.
Properties
| Name | Description |
|---|---|
| Not | Gets the condition that must not match. |
| Or | Gets the conditions of which one must match. |
| RequestDestination | Gets the destination of the request (e.g. script, style, document, or the empty string). |
| RequestMethod | Gets the method of the request (normalized before the comparison, e.g. post matches POST). |
| RequestMode | Gets the mode of the request (navigate, same-origin, no-cors or cors). |
| RunningStatus | Gets whether the service worker must be running, or not running. |
| UrlPattern | Gets the pattern of the URL of the request, relative to the URL of the script of the service worker. A pattern with regular expression groups is not allowed. |
Gets the condition that must not match.
public RouterCondition? Not { get; init; }Gets the conditions of which one must match.
public IReadOnlyList<RouterCondition>? Or { get; init; }RequestDestination
ServiceWorkerRouter.csGets the destination of the request (e.g. script, style, document, or the empty string).
public string? RequestDestination { get; init; }Property value
See also
RequestMethod
ServiceWorkerRouter.csGets the method of the request (normalized before the comparison, e.g. post matches POST).
public string? RequestMethod { get; init; }RequestMode
ServiceWorkerRouter.csGets the mode of the request (navigate, same-origin, no-cors or cors).
public string? RequestMode { get; init; }RunningStatus
ServiceWorkerRouter.csGets whether the service worker must be running, or not running.
public RunningStatus? RunningStatus { get; init; }Property value
See also
UrlPattern
ServiceWorkerRouter.csGets the pattern of the URL of the request, relative to the URL of the script of the service worker. A pattern with regular expression groups is not allowed.
public UrlPatternCompatible? UrlPattern { get; init; }