From ab80a3ccb93bd400a4b23df169ee4ff84e24a9ad Mon Sep 17 00:00:00 2001 From: Yoshisato Yanagisawa Date: Tue, 30 Apr 2024 05:46:55 +0000 Subject: [PATCH] Editorial: Add notice on the _or condition depth. --- docs/index.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/index.bs b/docs/index.bs index ed870d4f..5cf29519 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -1596,6 +1596,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ }; + Note: {{RouterCondition/_or}} and {{RouterCondition/not}} might have the other {{RouterCondition/_or}} or {{RouterCondition/not}} inside. To avoid spending much resources by the nested condition or performance penalty on evaluation, depth of such nested conditions can be limited. +

{{InstallEvent/addRoutes(rules)|event.addRoutes(rules)}}

@@ -3392,6 +3394,9 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ Note: For ease of understanding the router rule, the "or" condition is mutually exclusive with other conditions. 1. Let |orConditions| be |condition|["{{RouterCondition/_or}}"]. + + Note: To limit the resource usage and a condition evaluation time, |orConditions|'s [=list/size=] can be limited. + 1. For each |orCondition| of |orConditions|: 1. If running the [=Verify Router Condition=] algorithm with |orCondition| and |serviceWorker| returns false, return false. 1. Set |hasCondition| to true.