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

Move early abort in Get Trusted Type compliant string to step 1 #427

Merged
merged 1 commit into from
Jan 31, 2024
Merged
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
4 changes: 2 additions & 2 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,13 +1056,13 @@ It will ensure that the Trusted Type [=enforcement=] rules were respected.
Given a {{TrustedType}} type (|expectedType|), a [=realm/global object=] (|global|),
{{TrustedType}} or a string (|input|), a string (|sink|) and a string (|sinkGroup|), run these steps:

1. If |input| has type |expectedType|, return stringified
|input| and abort these steps.
1. Let |cspList| be the |global|'s <a>CSP list</a>.
1. If |cspList| is `null` or does not contain a [=content security policy object|policy=]
which [=directive set=] containing a [=directive=] with a name `"require-trusted-types-for"`,
or that directive does not contain a <a>trusted-types-sink-group</a> which is a match for a value |sinkGroup|,
return stringified |input| and abort these steps.
1. If |input| has type |expectedType|, return stringified
|input| and abort these steps.
1. Let |convertedInput| be the result of executing [$Process value with a default policy$] with the same arguments as this algorithm.
1. If the algorithm threw an error, rethrow the error and abort the following steps.
1. If |convertedInput| is `null` or `undefined`, execute the following steps:
Expand Down
Loading