Skip to content

Commit

Permalink
Modify the script slot setting algorithms. (#372)
Browse files Browse the repository at this point in the history
SHA: 2dec77e
Reason: push, by @koto

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
koto and github-actions[bot] committed Oct 3, 2022
1 parent 2233946 commit 118fc55
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions dist/spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link href="https://www.w3.org/2008/site/images/favicon.ico" rel="icon">
<meta content="Bikeshed version 44af0bf3e, updated Fri Jul 29 17:05:16 2022 -0700" name="generator">
<link href="https://w3c.github.io/trusted-types/dist/spec/" rel="canonical">
<meta content="a68596695d52fecc44c940883ca44f26321dbb27" name="document-revision">
<meta content="2dec77e935a3637080004d8bfed5ef144620390d" name="document-revision">
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
Expand Down Expand Up @@ -635,7 +635,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="2022-09-20">20 September 2022</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2022-10-03">3 October 2022</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -2219,8 +2219,20 @@ <h5 class="heading settled" data-level="4.3.3.2" id="setting-slot-values"><span
[<a class="idl-code" data-link-type="extended-attribute" href="https://html.spec.whatwg.org/multipage/custom-elements.html#cereactions" id="ref-for-cereactions⑤"><c- g>CEReactions</c-></a>] <c- b>attribute</c-> <a data-link-type="idl-name" href="#typedefdef-scriptstring" id="ref-for-typedefdef-scriptstring②"><c- n>ScriptString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="HTMLScriptElement" data-dfn-type="attribute" data-export data-type="ScriptString" id="dom-htmlscriptelement-text"><code><c- g>text</c-></code></dfn>;
};
</pre>
<p>On setting, the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/dom.html#dom-innertext" id="ref-for-dom-innertext①">innerText</a></code>, <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-node-textcontent" id="ref-for-dom-node-textcontent①">textContent</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-text" id="ref-for-dom-htmlscriptelement-text①">text</a></code> IDL attributes perform the regular steps, and then set <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-scripttext-slot" id="ref-for-dom-htmlscriptelement-scripttext-slot②">[[ScriptText]]</a></code> internal slot value with the stringified value.</p>
<p>On setting, the <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-src" id="ref-for-dom-htmlscriptelement-src②">src</a></code> IDL attribute performs the usual steps, and then sets <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-scripturl-slot" id="ref-for-dom-htmlscriptelement-scripturl-slot④">[[ScriptURL]]</a></code> internal slot value to its <code><a data-link-type="element-sub" href="https://html.spec.whatwg.org/multipage/scripting.html#attr-script-src" id="ref-for-attr-script-src③">src</a></code> content attribute value.</p>
<p>On setting the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/dom.html#dom-innertext" id="ref-for-dom-innertext①">innerText</a></code>, <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-node-textcontent" id="ref-for-dom-node-textcontent①">textContent</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-text" id="ref-for-dom-htmlscriptelement-text①">text</a></code> IDL attributes execute the following algorithm:</p>
<ol>
<li data-md>
<p>Set <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-scripttext-slot" id="ref-for-dom-htmlscriptelement-scripttext-slot②">[[ScriptText]]</a></code> internal slot value to the stringified attribute value.</p>
<li data-md>
<p>Perform the usual attribute setter steps.</p>
</ol>
<p>On setting the <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-src" id="ref-for-dom-htmlscriptelement-src②">src</a></code> IDL attribute, execute the following algorithm:</p>
<ol>
<li data-md>
<p>Set <code class="idl"><a data-link-type="idl" href="#dom-htmlscriptelement-scripturl-slot" id="ref-for-dom-htmlscriptelement-scripturl-slot④">[[ScriptURL]]</a></code> internal slot value to the stringified attribute value.</p>
<li data-md>
<p>Perform the usual attribute setter steps.</p>
</ol>
<h5 class="heading settled" data-level="4.3.3.3" id="slot-value-verification"><span class="secno">4.3.3.3. </span><span class="content">Slot value verification</span><a class="self-link" href="#slot-value-verification"></a></h5>
<p>The first few steps of the <a data-link-type="dfn" href="https://html.spec.whatwg.org/#prepare-the-script-element" id="ref-for-prepare-the-script-element">prepare the script element</a> algorithm are modified as follows:</p>
<ol>
Expand Down Expand Up @@ -3565,7 +3577,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
<a href="https://html.spec.whatwg.org/multipage/scripting.html#attr-script-src">https://html.spec.whatwg.org/multipage/scripting.html#attr-script-src</a><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-attr-script-src">3.7. Prepare the script URL and text</a> <a href="#ref-for-attr-script-src①">(2)</a> <a href="#ref-for-attr-script-src②">(3)</a>
<li><a href="#ref-for-attr-script-src③">4.3.3.2. Setting slot values</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="term-for-list-append">
Expand Down

0 comments on commit 118fc55

Please sign in to comment.