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

Update TrustedTypePolicyOptions usages to use map syntax. #528

Merged
merged 1 commit into from
Jul 18, 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
18 changes: 6 additions & 12 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -958,17 +958,11 @@ a string (|policyName|), {{TrustedTypePolicyOptions}} dictionary (|options|), an
value is not null, throw a TypeError and abort further steps.
1. Let |policy| be a new {{TrustedTypePolicy}} object.
1. Set |policy|'s `name` property value to |policyName|.
1. Let |policyOptions| be a new {{TrustedTypePolicyOptions}} object.
1. Set |policyOptions|
{{TrustedTypePolicy/createHTML()|createHTML}} property to |options|'
{{TrustedTypePolicyOptions/createHTML|createHTML}} property value.
1. Set |policyOptions| {{TrustedTypePolicy/createScript()|createScript}}
property to |options|'
{{TrustedTypePolicyOptions/createScript|createScript}} property value.
1. Set |policyOptions| {{TrustedTypePolicy/createScriptURL()|createScriptURL}}
property to |options|'
{{TrustedTypePolicyOptions/createScriptURL|createScriptURL}} property value.
1. Set |policy|'s [=TrustedTypePolicy/options=] value to *policyOptions*.
1. Set |policy|'s [=TrustedTypePolicy/options=] value to «[
"createHTML" -> |options|["{{TrustedTypePolicyOptions/createHTML|createHTML}}",
"createScript" -> |options|["{{TrustedTypePolicyOptions/createScript|createScript}}",
"createScriptURL" -> |options|["{{TrustedTypePolicyOptions/createScriptURL|createScriptURL}}"
]».
1. If the |policyName| is `default`, set the |factory|'s [=TrustedTypePolicyFactory/default policy=] value to |policy|.
1. [=set/append|Append=] |policyName| to |factory|'s [=created policy names=].
1. Return |policy|.
Expand Down Expand Up @@ -1011,7 +1005,7 @@ a string |value|, a list |arguments|, and a boolean |throwIfMissing|, execute th
</tr>
</table>

1. Let |function| be the value of the property in |policy|'s [=options=] named |functionName|.
1. Let |function| be |policy|'s [=options=][|functionName|].
1. If |function| is `null`, then:
1. If |throwIfMissing| throw a TypeError.
1. Else return `null`.
Expand Down
Loading