You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -393,9 +393,6 @@ will never change during its lifetime.
393
393
TrustedHTML object are to return the value from its
394
394
`[[Data]]` internal slot.
395
395
396
-
The <dfn method for="TrustedHTML">fromLiteral(object templateStringsArray)</dfn> method, when invoked, returns the result of executing a [$Create a Trusted Type from literal$] algorithm,
397
-
with {{TrustedHTML}} as |type| and |templateStringsArray| as |template|.
@@ -423,9 +419,6 @@ will never change during its lifetime.
423
419
TrustedScript object are to return the value from its
424
420
`[[Data]]` internal slot.
425
421
426
-
The <dfn method for="TrustedScript">fromLiteral(object templateStringsArray)</dfn> method, when invoked, returns the result of executing a [$Create a Trusted Type from literal$] algorithm,
427
-
with {{TrustedScript}} as |type| and |templateStringsArray| as |template|.
@@ -453,9 +445,6 @@ will never change during its lifetime.
453
445
TrustedScriptURL object are to return the value from its
454
446
`[[Data]]` internal slot.
455
447
456
-
The <dfn method for="TrustedScriptURL">fromLiteral(object templateStringsArray)</dfn> method, when invoked, returns the result of executing a [$Create a Trusted Type from literal$] algorithm,
457
-
with {{TrustedScriptURL}} as |type| and |templateStringsArray| as |template|.
458
-
459
448
## <dfn>Policies</dfn> ## {#policies-hdr}
460
449
461
450
Trusted Types can only be created via user-defined
@@ -1026,29 +1015,6 @@ a string |value|, a list |arguments|, and a boolean |throwIfMissing|, execute th
1026
1015
and [[ECMASCRIPT#sec-method|callback **this** value]] set to `null`, rethrowing any exceptions.
1027
1016
1. Return |policyValue|.
1028
1017
1029
-
## <dfn abstract-op>Create a Trusted Type from literal</dfn> ## {#create-a-trusted-type-from-literal-algorithm}
1030
-
1031
-
Given a {{TrustedType}} type |type| and an object |template|, execute the following steps:
1032
-
1033
-
1. If [$check templatedness$] of |template| returns false, throw a {{TypeError}}.
1034
-
1. If [$Get$](|template|, "length") is not equal to 1, throw a {{TypeError}}.
1035
-
1. Let |templatedValue| be the result of [$Get$](|template|, 0).
1036
-
1. If |type| is {{TrustedHTML}}, perform the following steps:
1037
-
1. Let |templateNode| be the results of [=create an element|creating an element=] given "template", the [=HTML namespace=] and [=current global object=]'s [=associated Document=].
1038
-
1. Assert: |templateNode| is {{HTMLTemplateElement}}.
1039
-
1. Let |fragment| be the result of invoking [$fragment parsing algorithm$], with |templatedValue| as <var ignore>markup</var>, and |templateNode| as a <var ignore>context element</var>.
1040
-
1. Set |templatedValue| to be the result of invoking [=HTML fragment serialization algorithm=], with |fragment| as <var ignore>the node</var>.
1041
-
1042
-
1. Return a new instance of an interface |type|, with its `[[Data]]` internal slot value set to |templatedValue|.
1043
-
1044
-
## Check templatedness of an object ## {#check-templatedness-algorithm}
1045
-
1046
-
To <dfn abstract-op>check templatedness</dfn> of an object |value|, perform the following steps. They return a boolean value:
1047
-
1048
-
1. Let |realm| be the <a>current Realm Record</a>.
1049
-
1. For each |item| of |realm|.\[[TemplateMap]], if |item|.\[[Array]] is |value|, return true.
1050
-
1. Return false.
1051
-
1052
1018
## <dfn abstract-op>Get Trusted Type compliant string</dfn> ## {#get-trusted-type-compliant-string-algorithm}
1053
1019
1054
1020
This algorithm will return a string that can be used with an
@@ -1643,8 +1609,8 @@ Content-Security-Policy: require-trusted-types-for 'script'; trusted-types one t
0 commit comments