@@ -384,14 +384,14 @@ interface TrustedHTML {
384
384
};
385
385
</pre>
386
386
387
- TrustedHTML objects have a ` [[Data]] ` internal slot which holds a
387
+ TrustedHTML objects have a <dfn for="TrustedHTML">\ [[Data]]</dfn> internal slot which holds a
388
388
DOMString. The slot's value is set when the object is created, and
389
389
will never change during its lifetime.
390
390
391
391
<dfn method for="TrustedHTML">toJSON()</dfn> method steps and the
392
392
<dfn for="TrustedHTML">stringification behavior</dfn> steps of a
393
393
TrustedHTML object are to return the value from its
394
- ` [[ Data]]` internal slot.
394
+ [=TrustedHTML/[[ Data]]=] internal slot.
395
395
396
396
### <dfn interface>TrustedScript</dfn> ### {#trusted-script}
397
397
@@ -410,14 +410,14 @@ interface TrustedScript {
410
410
};
411
411
</pre>
412
412
413
- TrustedScript objects have a ` [[Data]] ` internal slot which holds a
413
+ TrustedScript objects have a <dfn for="TrustedScript">\ [[Data]]</dfn> internal slot which holds a
414
414
DOMString. The slot's value is set when the object is created, and
415
415
will never change during its lifetime.
416
416
417
417
<dfn method for="TrustedScript">toJSON()</dfn> method steps and the
418
418
<dfn for="TrustedScript">stringification behavior</dfn> steps of a
419
419
TrustedScript object are to return the value from its
420
- ` [[ Data]]` internal slot.
420
+ [=TrustedScript/[[ Data]]=] internal slot.
421
421
422
422
### <dfn interface>TrustedScriptURL</dfn> ### {#trused-script-url}
423
423
@@ -436,14 +436,14 @@ interface TrustedScriptURL {
436
436
};
437
437
</pre>
438
438
439
- TrustedScriptURL objects have a ` [[Data]] ` internal slot which holds a
439
+ TrustedScriptURL objects have a <dfn for="TrustedScriptURL">\ [[Data]]</dfn> internal slot which holds a
440
440
USVString. The slot's value is set when the object is created, and
441
441
will never change during its lifetime.
442
442
443
443
<dfn method for="TrustedScriptURL">toJSON()</dfn> method steps and the
444
444
<dfn for="TrustedScriptURL">stringification behavior</dfn> steps of a
445
445
TrustedScriptURL object are to return the value from its
446
- ` [[ Data]]` internal slot.
446
+ [=TrustedScriptURL/[[ Data]]=] internal slot.
447
447
448
448
## <dfn>Policies</dfn> ## {#policies-hdr}
449
449
@@ -636,7 +636,7 @@ initially empty.
636
636
637
637
638
638
: <dfn>isHTML(value)</dfn>
639
- :: Returns true if value is an instance of {{TrustedHTML}} and has its ` [[ Data]]` internal slot set, false otherwise.
639
+ :: Returns true if value is an instance of {{TrustedHTML}} and has its [=TrustedHTML/[[ Data]]=] internal slot set, false otherwise.
640
640
641
641
Note: `is*` functions are used to check if a given object is truly a legitimate
642
642
[=Trusted Type=] object (i.e. it was created via one of the configured
@@ -658,10 +658,10 @@ initially empty.
658
658
659
659
660
660
: <dfn>isScript(value)</dfn>
661
- :: Returns true if value is an instance of {{TrustedScript}} and has its ` [[ Data]]` internal slot set, false otherwise.
661
+ :: Returns true if value is an instance of {{TrustedScript}} and has its [=TrustedScript/[[ Data]]=] internal slot set, false otherwise.
662
662
663
663
: <dfn>isScriptURL(value)</dfn>
664
- :: Returns true if value is an instance of {{TrustedScriptURL}} and has its ` [[ Data]]` internal slot set, false otherwise.
664
+ :: Returns true if value is an instance of {{TrustedScriptURL}} and has its [=TrustedScriptURL/[[ Data]]=] internal slot set, false otherwise.
665
665
666
666
: <dfn>getPropertyType(tagName, property, elementNs)</dfn>
667
667
:: Allows the authors to check if a Trusted Type is required for a given {{Element}} 's
@@ -720,7 +720,7 @@ initially empty.
720
720
<div dfn-type="attribute" dfn-for="TrustedTypePolicyFactory">
721
721
722
722
: <dfn>emptyHTML</dfn>
723
- :: is a {{TrustedHTML}} object with its ` [[ Data]]` internal slot value set to an empty string.
723
+ :: is a {{TrustedHTML}} object with its [=TrustedHTML/[[ Data]]=] internal slot value set to an empty string.
724
724
725
725
<div class="example" id="empty-html-example">
726
726
<xmp highlight="js">
@@ -729,7 +729,7 @@ anElement.innerHTML = trustedTypes.emptyHTML; // no need to create a policy
729
729
</div>
730
730
731
731
: <dfn>emptyScript</dfn>
732
- :: is a {{TrustedScript}} object with its ` [[ Data]]` internal slot value set to an empty string.
732
+ :: is a {{TrustedScript}} object with its [=TrustedScript/[[ Data]]=] internal slot value set to an empty string.
733
733
734
734
Note: This object can be used to detect if the runtime environment has [[#csp-eval]] . While native Trusted Types implementation can
735
735
support `eval(TrustedScript)`, it is impossible for a polyfill to emulate that, as
@@ -1756,15 +1756,15 @@ throws an "`EvalError`" if not:
1756
1756
1. <ins> Let |isTrusted| be `true`.</ins>
1757
1757
1. <ins> If |bodyArg| is not a {{TrustedScript}} object, set |isTrusted| to `false`.</ins>
1758
1758
1. <ins> If |isTrusted| is `true` then:
1759
- 1. <ins> If |bodyString| is not equal to |bodyArg|'s ` [[ Data]]` internal slot, set |isTrusted| to `false`.</ins>
1759
+ 1. <ins> If |bodyString| is not equal to |bodyArg|'s [=TrustedScript/[[ Data]]=] internal slot, set |isTrusted| to `false`.</ins>
1760
1760
1. <ins> If |isTrusted| is `true`, then:</ins>
1761
1761
1. <ins> For each |arg| in |parameterArgs|:</ins>
1762
1762
1. <ins> Let |index| be the index of |arg| in |parameterArgs|.</ins>
1763
1763
1. <ins> If |arg| is not a {{TrustedScript}} object, set |isTrusted| to `false`.</ins>
1764
1764
1. <ins> If |isTrusted| is `true`, then:</ins>
1765
- 1. <ins> if |parameterStrings|[|index|] is not equal to |arg|'s ` [[ Data]]` internal slot, set |isTrusted| to `false`.</ins>
1765
+ 1. <ins> if |parameterStrings|[|index|] is not equal to |arg|'s [=TrustedScript/[[ Data]]=] internal slot, set |isTrusted| to `false`.</ins>
1766
1766
1. <ins> If |isTrusted| is `true`, let |sourceToValidate| be a new instance of
1767
- the {{TrustedScript}} interface, with its ` [[ Data]]` internal slot value
1767
+ the {{TrustedScript}} interface, with its [=TrustedScript/[[ Data]]=] internal slot value
1768
1768
set to |source|. Otherwise, let |sourceToValidate| be |source|.</ins>
1769
1769
1770
1770
1. <ins> Let |sourceString| be the result of executing the
0 commit comments