Skip to content

Commit

Permalink
Editorial: Add notice on the _or condition depth.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshisatoyanagisawa committed Apr 30, 2024
1 parent 8d64a5c commit ab80a3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
};
</pre>

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.

<section>
<h4 id="register-router-method">{{InstallEvent/addRoutes(rules)|event.addRoutes(rules)}}</h4>

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit ab80a3c

Please sign in to comment.