Open
Conversation
annevk
reviewed
Jul 3, 2025
| |input| and abort these steps. | ||
| 1. Let |requireTrustedTypes| be the result of executing [$Does sink type require trusted types?$] algorithm, | ||
| passing |global|, |sinkGroup|, and true. | ||
| 1. If |input| is an instance of |expectedType|, return stringified |input| and abort these steps. |
|
|
||
| 1. Let |policyValue| be the result of executing [$Get Trusted Type policy value$] with the same arguments as this algorithm and additionally true as |throwIfMissing|. | ||
| 1. Let |policyValue| be the result of [$Get Trusted Type policy value$] given |policy|, |trustedTypeName|, |value|, | ||
| |arguments|, and `true`. |
Member
There was a problem hiding this comment.
Infra style has no markup for boolean values.
| a string |value| and a list |arguments|, execute the following steps: | ||
|
|
||
| 1. Let |policyValue| be the result of executing [$Get Trusted Type policy value$] with the same arguments as this algorithm and additionally true as |throwIfMissing|. | ||
| 1. Let |policyValue| be the result of [$Get Trusted Type policy value$] given |policy|, |trustedTypeName|, |value|, |
Member
There was a problem hiding this comment.
It would be nice to fix the naming of these algorithms at some point too to be more Infra-aligned.
Member
Author
There was a problem hiding this comment.
Yeah I'm going to take a look at that as a follow-up they seem to be defined wrong too as I don't think [$$] is the normal syntax
| * |encodedScriptSource| as |input| | ||
| * `"Location href"` as |sink| | ||
| 1. Let |convertedScriptSource| be the result of [$Process value with a default policy|processing value with a default policy$] given {{TrustedScript}}, | ||
| |request|'s [=request/clients=]'s [=environment settings object/global object=], |encodedScriptSource|, `"Location href"`. |
| on |global|, |policy| and `"require-trusted-types-for"` | ||
| 1. Let |violation| be the result of | ||
| [[CSP#create-violation-for-global|Creating a violation object]] | ||
| with |global|, |policy| and `"require-trusted-types-for"` |
Member
There was a problem hiding this comment.
Suggested change
| with |global|, |policy| and `"require-trusted-types-for"` | |
| given |global|, |policy|, and `"require-trusted-types-for"`. |
Comment on lines
+1583
to
1584
| [[CSP#create-violation-for-global|Creating a violation object]] with |global|, |policy| and | ||
| `"trusted-types"` |
Member
There was a problem hiding this comment.
Suggested change
| [[CSP#create-violation-for-global|Creating a violation object]] with |global|, |policy| and | |
| `"trusted-types"` | |
| [[CSP#create-violation-for-global|Creating a violation object]] given |global|, |policy|, and | |
| `"trusted-types"`. |
| * |element| | ||
| * |attributeName| | ||
| * |attributeNs| | ||
| 1. Set |attributeData| to the result of [$Get Trusted Type data for attribute$] given |element|, |attributeName|, |attributeNs|. |
Member
There was a problem hiding this comment.
Suggested change
| 1. Set |attributeData| to the result of [$Get Trusted Type data for attribute$] given |element|, |attributeName|, |attributeNs|. | |
| 1. Let |attributeData| to the result of [$Get Trusted Type data for attribute$] given |element|, |attributeName|, and |attributeNs|. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview | Diff