diff --git a/index.bs b/index.bs index 01e96849..dd590862 100644 --- a/index.bs +++ b/index.bs @@ -1058,6 +1058,22 @@ partial interface HTMLIFrameElement { Note: This algorithm should be called when a feature policy has been violated. +
+

Should request be allowed to use feature?

+

Given a feature (feature) and a request (request), this algorithm returns true if the request should be allowed to use feature, and false otherwise.

+
    +
  1. Set |window| to |request|’s window.
  2. +
  3. If |window| is not a {{Window}}, return false. +
    Feature Policy within `no-window` contexts ({{WorkerGlobalScope}} or {{WorkletGlobalScope}}) is being figured out in issue #207. After that’s resolved, update this algorithm to allow fetches initiated within these contexts to use policy-controlled features. *Until* that’s resolved, disallow all policy-controlled features (e.g., sending Client Hints to third parties) in these contexts.
    +
  4. +
  5. Set |document| to |window|’s associated `Document`.
  6. +
  7. Let |origin| be |request|’s origin.
  8. +
  9. Let |result| be the result of executing Is feature enabled in document for origin? on |feature|, |document|, and |origin|. +
  10. +
  11. If |result| is "Enabled", return true.
  12. +
  13. Otherwise, return false.
  14. +
+