-
Notifications
You must be signed in to change notification settings - Fork 82
Cleanup calling of some algorithms #591
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
base: main
Are you sure you want to change the base?
Conversation
|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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then return
@@ -1090,7 +1090,8 @@ a string (|policyName|), {{TrustedTypePolicyOptions}} dictionary (|options|), an | |||
Given a {{TrustedTypePolicy}} |policy|, a type name |trustedTypeName|, | |||
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|, | |||
|arguments|, and `true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infra style has no markup for boolean values.
@@ -1090,7 +1090,8 @@ a string (|policyName|), {{TrustedTypePolicyOptions}} dictionary (|options|), an | |||
Given a {{TrustedTypePolicy}} |policy|, a type name |trustedTypeName|, | |||
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|, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to fix the naming of these algorithms at some point too to be more Infra-aligned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "and"
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"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with |global|, |policy| and `"require-trusted-types-for"` | |
given |global|, |policy|, and `"require-trusted-types-for"`. |
[[CSP#create-violation-for-global|Creating a violation object]] with |global|, |policy| and | ||
`"trusted-types"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[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|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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|. |
Preview | Diff