Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Add notice on the _or condition depth. #1714

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading