Skip to content

Commit 013e136

Browse files
yoshisatoyanagisawasisidovski
authored andcommitted
Editorial: Add notice on the _or condition depth.
1 parent a14460b commit 013e136

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/index.bs

+5
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
16001600
};
16011601
</pre>
16021602

1603+
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.
1604+
16031605
<section>
16041606
<h4 id="register-router-method">{{InstallEvent/addRoutes(rules)|event.addRoutes(rules)}}</h4>
16051607

@@ -3399,6 +3401,9 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
33993401
Note: For ease of understanding the router rule, the "or" condition is mutually exclusive with other conditions.
34003402

34013403
1. Let |orConditions| be |condition|["{{RouterCondition/_or}}"].
3404+
3405+
Note: To limit the resource usage and a condition evaluation time, |orConditions|'s [=list/size=] can be limited.
3406+
34023407
1. For each |orCondition| of |orConditions|:
34033408
1. If running the [=Verify Router Condition=] algorithm with |orCondition| and |serviceWorker| returns false, return false.
34043409
1. Set |hasCondition| to true.

0 commit comments

Comments
 (0)