Skip to content

Commit

Permalink
Update index.bs
Browse files Browse the repository at this point in the history
Add a monkey patch
  • Loading branch information
shhnjk authored Sep 20, 2024
1 parent 984db36 commit 9df72a4
Showing 1 changed file with 44 additions and 26 deletions.
70 changes: 44 additions & 26 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -764,35 +764,12 @@ partial interface HTMLIFrameElement {
<p>To get the <a>observable policy</a> for an Element |node|, run the
following steps:</p>
1. Let |inherited policy| be an empty [=ordered map=].
2. [=set/For each=] <a>supported feature</a> |feature|:
3. [=set/For each=] <a>supported feature</a> |feature|:
1. Let |isInherited| be the result of running <a abstract-op>Define
an inherited policy for feature in container at origin</a> on
|feature|, |node| and |node|'s <a>declared origin</a>.
2. Set |inherited policy|[|feature|] to |isInherited|.
3. If |node| is a <a>navigable container</a>:
1. Let |document| be |node|'s <a>node document</a>.
2. Let |settings| be |document|'s <a>environment settings
object</a>.
3. If |isInherited| is "<code>Disabled</code>":
1. Let |endpoint| be the result of calling <a abstract-op>Get
the reporting endpoint for a feature</a> given |feature| and
|document|'s [=Document/permissions policy=].
2. Call <a abstract-op>Generate report for potential violation
of permissions policy on settings</a> given |feature|,
|settings|, "<code>Enforce</code>", and |endpoint|.
4. If the result of running <a abstract-op>Define an inherited
policy for feature in container at origin</a> on |feature|,
|node|, |node|'s <a>declared origin</a> and True is
"<code>Disabled</code>":
1. Let |report-only endpoint| be the result of calling <a
abstract-op>Get the reporting endpoint for a feature</a>
given |feature| and |document|'s [=Document/report-only
permissions policy=].
2. Call <a abstract-op>Generate report for potential violation
of permissions policy on settings</a> given |feature|,
|settings|, "<code>Report</code>", and |report-only
endpoint|.
3. Return a new <a>permissions policy</a> with <a for="permissions
4. Return a new <a>permissions policy</a> with <a for="permissions
policy">inherited policy</a> |inherited policy|, <a
for="permissions policy">declared policy</a> a [=struct=] with both
[=declared policy/declarations=] and [=declared policy/reporting
Expand Down Expand Up @@ -1212,6 +1189,41 @@ partial interface HTMLIFrameElement {

</div>
</section>
<section>
## <dfn abstract-op id="check-potential-violation-in-container">Check potential violation of permissions policy in container</dfn> ## {#algo-check-potential-violation-in-container}

<div class="algorithm" data-algorithm="check-potential-violation-in-container">
Given a <a>navigable container</a> (|container|), this algorithm sends potential
violation reports.
1. Let |document| be |container|'s <a>node document</a>.
2. Let |settings| be |document|'s <a>environment settings
object</a>.
3. [=set/For each=] <a>supported feature</a> |feature|:
1. If the result of running <a abstract-op>Define an inherited
policy for feature in container at origin</a> on |feature|,
|container| and |container|'s <a>declared origin</a> is
"<code>Disabled</code>":
1. Let |endpoint| be the result of calling <a abstract-op>Get
the reporting endpoint for a feature</a> given |feature| and
|document|'s [=Document/permissions policy=].
2. Call <a abstract-op>Generate report for potential violation
of permissions policy on settings</a> given |feature|,
|settings|, "<code>Enforce</code>", and |endpoint|.
2. If the result of running <a abstract-op>Define an inherited
policy for feature in container at origin</a> on |feature|,
|container|, |container|'s <a>declared origin</a> and True is
"<code>Disabled</code>":
1. Let |report-only endpoint| be the result of calling <a
abstract-op>Get the reporting endpoint for a feature</a>
given |feature| and |document|'s [=Document/report-only
permissions policy=].
2. Call <a abstract-op>Generate report for potential violation
of permissions policy on settings</a> given |feature|,
|settings|, "<code>Report</code>", and |report-only
endpoint|.

</div>
</section>
<section>
## <dfn export abstract-op id="report-permissions-policy-violation">Generate report for violation of permissions policy on settings</dfn> ## {#algo-report-permissions-policy-violation}

Expand Down Expand Up @@ -1329,7 +1341,13 @@ partial interface HTMLIFrameElement {
navigationParams's origin, navigationParams's response, and True.

And in the same section, in step 10, set the new {{Document}}'s
[=Document/report-only permissions policy=] to |reportOnlyPermissionsPolicy|.
[=Document/report-only permissions policy=] to |reportOnlyPermissionsPolicy|.

And in the same section, in step 19 before the return, insert the following step:

19. If navigationParams's navigable's container is not null, call <a
abstract-op>Check potential violation of permissions policy in
container</a> given navigationParams's navigable's container.
</section>
</section>

Expand Down

0 comments on commit 9df72a4

Please sign in to comment.