Skip to content

Commit

Permalink
Remove HostEnsureCanCompileStrings and HostGetCodeForEval (#523)
Browse files Browse the repository at this point in the history
SHA: e776fc6
Reason: push, by lukewarlow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
lukewarlow and github-actions[bot] committed Jun 18, 2024
1 parent 3b31f76 commit 00d17c0
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions dist/spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator">
<link href="https://www.w3.org/TR/trusted-types/" rel="canonical">
<meta content="a1862e540904d7015747f99bbf622e459bd9b7aa" name="document-revision">
<meta content="e776fc659cfb1834d4f81d158379e5d6e165ea9d" name="document-revision">
<style>/* Boilerplate: style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: var(--a-normal-text);
Expand Down Expand Up @@ -1005,7 +1005,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Trusted Types</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-06-12">12 June 2024</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-06-18">18 June 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -1127,8 +1127,6 @@ <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<li><a href="#setting-slot-values-from-parser"><span class="secno">4.1.2.6</span> <span class="content">Setting slot values from parser</span></a>
<li><a href="#slot-value-verification"><span class="secno">4.1.2.7</span> <span class="content">Slot value verification</span></a>
</ol>
<li><a href="#host-ensure-can-compile-strings"><span class="secno">4.1.3</span> <span class="content">HostEnsureCanCompileStrings</span></a>
<li><a href="#host-get-code-for-eval"><span class="secno">4.1.4</span> <span class="content">HostGetCodeForEval</span></a>
</ol>
<li><a href="#integration-with-dom"><span class="secno">4.2</span> <span class="content">Integration with DOM</span></a>
<li>
Expand Down Expand Up @@ -2379,30 +2377,6 @@ <h5 class="heading settled" data-level="4.1.2.7" id="slot-value-verification"><s
</p>
<li>...
</ol>
<h4 class="heading settled" data-level="4.1.3" id="host-ensure-can-compile-strings"><span class="secno">4.1.3. </span><span class="content">HostEnsureCanCompileStrings</span><a class="self-link" href="#host-ensure-can-compile-strings"></a></h4>
<p>
JavaScript contains an <span>implementation-defined</span> <a href="https://tc39.es/ecma262/#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</a>(<var>realm</var>,
<ins><var>parameterStrings</var>, <var>bodyString</var>, <var>compilationType</var>, <var>parameterArgs</var>, <var>bodyArg</var></ins>
)
abstract operation. User agents must use the following implementation:
</p>
<ol>
<li data-md>
<p>
Perform ? <a href="https://w3c.github.io/webappsec-csp/#can-compile-strings">EnsureCSPDoesNotBlockStringCompilation</a>(<var>realm</var>,
<ins><var>parameterStrings</var>, <var>bodyString</var>, <var>compilationType</var>, <var>parameterArgs</var>, <var>bodyArg</var></ins>
).
</p>
</ol>
<h4 class="heading settled" data-level="4.1.4" id="host-get-code-for-eval"><span class="secno">4.1.4. </span><span class="content">HostGetCodeForEval</span><a class="self-link" href="#host-get-code-for-eval"></a></h4>
<p>JavaScript contains an <span>implementation-defined</span> <a href="https://tc39.es/ecma262/#sec-hostgetcodeforeval">HostGetCodeForEval</a>(<var>argument</var>)
abstract operation. User agents must use the following implementation:</p>
<ol>
<li data-md>
<p>If <var>argument</var> is a <code class="idl"><a data-link-type="idl" href="#trustedscript" id="ref-for-trustedscript①⑧">TrustedScript</a></code> object, return the value of its associated <a data-link-type="dfn" href="#trustedscript-data" id="ref-for-trustedscript-data③">data</a>.</p>
<li data-md>
<p>Return ~unknown~.</p>
</ol>
<h3 class="heading settled" data-level="4.2" id="integration-with-dom"><span class="secno">4.2. </span><span class="content">Integration with DOM</span><a class="self-link" href="#integration-with-dom"></a></h3>
<p class="note" role="note"><span class="marker">Note:</span> See <a href="https://github.com/whatwg/dom/pull/1258">https://github.com/whatwg/dom/pull/1258</a> and <a href="https://github.com/whatwg/dom/pull/1268">https://github.com/whatwg/dom/pull/1268</a> which upstream this integration.</p>
<h3 class="heading settled" data-level="4.3" id="integration-with-content-security-policy"><span class="secno">4.3. </span><span class="content">Integration with Content Security Policy</span><a class="self-link" href="#integration-with-content-security-policy"></a></h3>
Expand Down Expand Up @@ -2437,15 +2411,15 @@ <h5 class="heading settled" data-level="4.3.1.1" id="require-trusted-types-for-p
<p>Let <var>convertedScriptSource</var> be the result of executing <a data-link-type="abstract-op" href="#abstract-opdef-process-value-with-a-default-policy" id="ref-for-abstract-opdef-process-value-with-a-default-policy①">Process value with a default policy</a> algorithm, with the following arguments:</p>
<ul>
<li data-md>
<p><code class="idl"><a data-link-type="idl" href="#trustedscript" id="ref-for-trustedscript①">TrustedScript</a></code> as <var>expectedType</var></p>
<p><code class="idl"><a data-link-type="idl" href="#trustedscript" id="ref-for-trustedscript①">TrustedScript</a></code> as <var>expectedType</var></p>
<li data-md>
<p><var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-client" id="ref-for-concept-request-client">clients</a>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global" id="ref-for-concept-settings-object-global">global object</a> as <var>global</var></p>
<li data-md>
<p><var>encodedScriptSource</var> as <var>input</var></p>
<li data-md>
<p><code>"Location href"</code> as <var>sink</var></p>
</ul>
<p>If that algorithm threw an error or <var>convertedScriptSource</var> is not a <code class="idl"><a data-link-type="idl" href="#trustedscript" id="ref-for-trustedscript②⓪">TrustedScript</a></code> object, return "Blocked" and abort further steps.</p>
<p>If that algorithm threw an error or <var>convertedScriptSource</var> is not a <code class="idl"><a data-link-type="idl" href="#trustedscript" id="ref-for-trustedscript①⑨">TrustedScript</a></code> object, return "Blocked" and abort further steps.</p>
<li data-md>
<p>Set <var>urlString</var> to be the result of prepending <code>"javascript:"</code> to stringified <var>convertedScriptSource</var>.</p>
<li data-md>
Expand Down Expand Up @@ -3767,8 +3741,8 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
window.dfnpanelData['trustedhtml-data'] = {"dfnID": "trustedhtml-data", "url": "#trustedhtml-data", "dfnText": "data", "refSections": [{"refs": [{"id": "ref-for-trustedhtml-data"}], "title": "2.2.1. TrustedHTML"}, {"refs": [{"id": "ref-for-trustedhtml-data\u2460"}, {"id": "ref-for-trustedhtml-data\u2461"}], "title": "2.3.1. TrustedTypePolicyFactory"}], "external": false};
window.dfnpanelData['dom-trustedhtml-tojson'] = {"dfnID": "dom-trustedhtml-tojson", "url": "#dom-trustedhtml-tojson", "dfnText": "toJSON()", "refSections": [{"refs": [{"id": "ref-for-dom-trustedhtml-tojson"}], "title": "2.2.1. TrustedHTML"}], "external": false};
window.dfnpanelData['trustedhtml-stringification-behavior'] = {"dfnID": "trustedhtml-stringification-behavior", "url": "#trustedhtml-stringification-behavior", "dfnText": "stringification behavior", "refSections": [{"refs": [{"id": "ref-for-trustedhtml-stringification-behavior"}], "title": "2.2.1. TrustedHTML"}], "external": false};
window.dfnpanelData['trustedscript'] = {"dfnID": "trustedscript", "url": "#trustedscript", "dfnText": "TrustedScript", "refSections": [{"refs": [{"id": "ref-for-trustedscript"}], "title": "2.2.2. TrustedScript"}, {"refs": [{"id": "ref-for-trustedscript\u2460"}, {"id": "ref-for-trustedscript\u2461"}, {"id": "ref-for-trustedscript\u2462"}, {"id": "ref-for-trustedscript\u2463"}, {"id": "ref-for-trustedscript\u2464"}, {"id": "ref-for-trustedscript\u2465"}, {"id": "ref-for-trustedscript\u2466"}], "title": "2.3.1. TrustedTypePolicyFactory"}, {"refs": [{"id": "ref-for-trustedscript\u2467"}], "title": "2.3.2. TrustedTypePolicy"}, {"refs": [{"id": "ref-for-trustedscript\u2468"}], "title": "3.7. Get Trusted Types-compliant attribute value"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u24ea"}], "title": "3.8. Get Trusted Type data for attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2460"}], "title": "4. Integrations"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2461"}, {"id": "ref-for-trustedscript\u2460\u2462"}, {"id": "ref-for-trustedscript\u2460\u2463"}], "title": "4.1.2. Enforcement for scripts"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2464"}], "title": "4.1.2.2. The innerText IDL attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2465"}], "title": "4.1.2.3. The textContent IDL attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2466"}], "title": "4.1.2.4. The text IDL attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2467"}], "title": "4.1.4. HostGetCodeForEval"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2468"}, {"id": "ref-for-trustedscript\u2461\u24ea"}], "title": "4.3.1.1. require-trusted-types-for Pre-Navigation check"}], "external": false};
window.dfnpanelData['trustedscript-data'] = {"dfnID": "trustedscript-data", "url": "#trustedscript-data", "dfnText": "data", "refSections": [{"refs": [{"id": "ref-for-trustedscript-data"}], "title": "2.2.2. TrustedScript"}, {"refs": [{"id": "ref-for-trustedscript-data\u2460"}, {"id": "ref-for-trustedscript-data\u2461"}], "title": "2.3.1. TrustedTypePolicyFactory"}, {"refs": [{"id": "ref-for-trustedscript-data\u2462"}], "title": "4.1.4. HostGetCodeForEval"}], "external": false};
window.dfnpanelData['trustedscript'] = {"dfnID": "trustedscript", "url": "#trustedscript", "dfnText": "TrustedScript", "refSections": [{"refs": [{"id": "ref-for-trustedscript"}], "title": "2.2.2. TrustedScript"}, {"refs": [{"id": "ref-for-trustedscript\u2460"}, {"id": "ref-for-trustedscript\u2461"}, {"id": "ref-for-trustedscript\u2462"}, {"id": "ref-for-trustedscript\u2463"}, {"id": "ref-for-trustedscript\u2464"}, {"id": "ref-for-trustedscript\u2465"}, {"id": "ref-for-trustedscript\u2466"}], "title": "2.3.1. TrustedTypePolicyFactory"}, {"refs": [{"id": "ref-for-trustedscript\u2467"}], "title": "2.3.2. TrustedTypePolicy"}, {"refs": [{"id": "ref-for-trustedscript\u2468"}], "title": "3.7. Get Trusted Types-compliant attribute value"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u24ea"}], "title": "3.8. Get Trusted Type data for attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2460"}], "title": "4. Integrations"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2461"}, {"id": "ref-for-trustedscript\u2460\u2462"}, {"id": "ref-for-trustedscript\u2460\u2463"}], "title": "4.1.2. Enforcement for scripts"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2464"}], "title": "4.1.2.2. The innerText IDL attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2465"}], "title": "4.1.2.3. The textContent IDL attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2466"}], "title": "4.1.2.4. The text IDL attribute"}, {"refs": [{"id": "ref-for-trustedscript\u2460\u2467"}, {"id": "ref-for-trustedscript\u2460\u2468"}], "title": "4.3.1.1. require-trusted-types-for Pre-Navigation check"}], "external": false};
window.dfnpanelData['trustedscript-data'] = {"dfnID": "trustedscript-data", "url": "#trustedscript-data", "dfnText": "data", "refSections": [{"refs": [{"id": "ref-for-trustedscript-data"}], "title": "2.2.2. TrustedScript"}, {"refs": [{"id": "ref-for-trustedscript-data\u2460"}, {"id": "ref-for-trustedscript-data\u2461"}], "title": "2.3.1. TrustedTypePolicyFactory"}], "external": false};
window.dfnpanelData['dom-trustedscript-tojson'] = {"dfnID": "dom-trustedscript-tojson", "url": "#dom-trustedscript-tojson", "dfnText": "toJSON()", "refSections": [{"refs": [{"id": "ref-for-dom-trustedscript-tojson"}], "title": "2.2.2. TrustedScript"}], "external": false};
window.dfnpanelData['trustedscript-stringification-behavior'] = {"dfnID": "trustedscript-stringification-behavior", "url": "#trustedscript-stringification-behavior", "dfnText": "stringification behavior", "refSections": [{"refs": [{"id": "ref-for-trustedscript-stringification-behavior"}], "title": "2.2.2. TrustedScript"}], "external": false};
window.dfnpanelData['trustedscripturl'] = {"dfnID": "trustedscripturl", "url": "#trustedscripturl", "dfnText": "TrustedScriptURL", "refSections": [{"refs": [{"id": "ref-for-trustedscripturl"}], "title": "2.2.3. TrustedScriptURL"}, {"refs": [{"id": "ref-for-trustedscripturl\u2460"}, {"id": "ref-for-trustedscripturl\u2461"}], "title": "2.3.1. TrustedTypePolicyFactory"}, {"refs": [{"id": "ref-for-trustedscripturl\u2462"}], "title": "2.3.2. TrustedTypePolicy"}, {"refs": [{"id": "ref-for-trustedscripturl\u2463"}], "title": "3.6. Prepare the script text"}, {"refs": [{"id": "ref-for-trustedscripturl\u2464"}], "title": "3.7. Get Trusted Types-compliant attribute value"}, {"refs": [{"id": "ref-for-trustedscripturl\u2465"}, {"id": "ref-for-trustedscripturl\u2466"}, {"id": "ref-for-trustedscripturl\u2467"}], "title": "3.8. Get Trusted Type data for attribute"}, {"refs": [{"id": "ref-for-trustedscripturl\u2468"}], "title": "4. Integrations"}, {"refs": [{"id": "ref-for-trustedscripturl\u2460\u24ea"}], "title": "4.1.2. Enforcement for scripts"}, {"refs": [{"id": "ref-for-trustedscripturl\u2460\u2460"}], "title": "4.1.2.5. The src IDL attribute"}], "external": false};
Expand Down

0 comments on commit 00d17c0

Please sign in to comment.