Skip to content

Commit

Permalink
Upstream IDL changes from Trusted Types
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarlow committed Mar 13, 2024
1 parent a187fec commit 309d8b4
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4578,6 +4578,19 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
</dd>
</dl>

<dt>Trusted Types</dt>

<dd>
<p>This specification uses the following features defined in <cite>Trusted Types</cite>:
<ref>TRUSTED-TYPES</ref></p>

<ul class="brief">
<li><dfn data-x="tt-htmlstring" data-x-href="https://w3c.github.io/trusted-types/dist/spec/#typedefdef-htmlstring"><code>HTMLString</code></dfn></li>
<li><dfn data-x="tt-scriptstring" data-x-href="https://w3c.github.io/trusted-types/dist/spec/#typedefdef-scriptstring"><code>ScriptString</code></dfn></li>
<li><dfn data-x="tt-scripturlstring" data-x-href="https://w3c.github.io/trusted-types/dist/spec/#typedefdef-scripturlstring"><code>ScriptURLString</code></dfn></li>
</ul>
</dd>

<hr>

<p>This specification does not <em>require</em> support of any particular network protocol, style
Expand Down Expand Up @@ -10626,7 +10639,7 @@ typedef (<span>HTMLScriptElement</span> or <span>SVGScriptElement</span>) <dfn t

[<span>LegacyOverrideBuiltIns</span>]
partial interface <dfn id="document" data-lt="">Document</dfn> {
static <code>Document</code> <span data-x="dom-parseHTMLUnsafe">parseHTMLUnsafe</span>(DOMString html);
static <code>Document</code> <span data-x="dom-parseHTMLUnsafe">parseHTMLUnsafe</span>(<code data-x="tt-htmlstring">HTMLString</code> html);

// <span>resource metadata management</span>
[PutForwards=<span data-x="dom-location-href">href</span>, <span>LegacyUnforgeable</span>] readonly attribute <span>Location</span>? <span data-x="dom-document-location">location</span>;
Expand Down Expand Up @@ -10655,8 +10668,8 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
[<span>CEReactions</span>] <span>Document</span> <span data-x="dom-document-open">open</span>(optional DOMString unused1, optional DOMString unused2); // both arguments are <a href="#dom-document-open-unused-arguments">ignored</a>
<span>WindowProxy</span>? <span data-x="dom-document-open-window">open</span>(USVString url, DOMString name, DOMString features);
[<span>CEReactions</span>] undefined <span data-x="dom-document-close">close</span>();
[<span>CEReactions</span>] undefined <span data-x="dom-document-write">write</span>(DOMString... text);
[<span>CEReactions</span>] undefined <span data-x="dom-document-writeln">writeln</span>(DOMString... text);
[<span>CEReactions</span>] undefined <span data-x="dom-document-write">write</span>(<code data-x="tt-htmlstring">HTMLString</code>... text);
[<span>CEReactions</span>] undefined <span data-x="dom-document-writeln">writeln</span>(<code data-x="tt-htmlstring">HTMLString</code>... text);

// <span>user interaction</span>
readonly attribute <span>WindowProxy</span>? <span data-x="dom-document-defaultView">defaultView</span>;
Expand Down Expand Up @@ -33014,7 +33027,7 @@ interface <dfn interface>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute USVString <span data-x="dom-iframe-src">src</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-srcdoc">srcdoc</span>;
[<span>CEReactions</span>] attribute <code data-x="tt-htmlstring">HTMLString</code> <span data-x="dom-iframe-srcdoc">srcdoc</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-name">name</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-iframe-sandbox">sandbox</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-iframe-allow">allow</span>;
Expand Down Expand Up @@ -33887,7 +33900,7 @@ interface <dfn interface>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
interface <dfn interface>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute USVString <span data-x="dom-embed-src">src</span>;
[<span>CEReactions</span>] attribute <code data-x="tt-scripturlstring">ScriptURLString</code> <span data-x="dom-embed-src">src</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-embed-type">type</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-dim-width">width</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-dim-height">height</span>;
Expand Down Expand Up @@ -34164,7 +34177,7 @@ interface <dfn interface>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
interface <dfn interface>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute USVString <span data-x="dom-object-data">data</span>;
[<span>CEReactions</span>] attribute <code data-x="tt-scripturlstring">ScriptURLString</code> <span data-x="dom-object-data">data</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-object-type">type</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-object-name">name</span>;
readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>;
Expand Down Expand Up @@ -61643,13 +61656,13 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
interface <dfn interface>HTMLScriptElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute USVString <span data-x="dom-script-src">src</span>;
[<span>CEReactions</span>] attribute <code data-x="tt-scripturlstring">ScriptURLString</code> <span data-x="dom-script-src">src</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-type">type</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-script-noModule">noModule</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-script-async">async</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-script-defer">defer</span>;
[<span>CEReactions</span>] attribute DOMString? <span data-x="dom-script-crossOrigin">crossOrigin</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-text">text</span>;
[<span>CEReactions</span>] attribute <code data-x="tt-scriptstring">ScriptString</code> <span data-x="dom-script-text">text</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-integrity">integrity</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-script-referrerPolicy">referrerPolicy</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-script-blocking">blocking</span>;
Expand Down Expand Up @@ -112188,7 +112201,7 @@ document.body.appendChild(frame)</code></pre>
interface <dfn interface>DOMParser</dfn> {
<span data-x="dom-DOMParser-constructor">constructor</span>();

[NewObject] <code>Document</code> <span data-x="dom-DOMParser-parseFromString">parseFromString</span>(DOMString <var>string</var>, <span>DOMParserSupportedType</span> <var>type</var>);
[NewObject] <code>Document</code> <span data-x="dom-DOMParser-parseFromString">parseFromString</span>(<code data-x="tt-htmlstring">HTMLString</code> <var>string</var>, <span>DOMParserSupportedType</span> <var>type</var>);
};

enum <dfn enum>DOMParserSupportedType</dfn> {
Expand Down Expand Up @@ -112339,11 +112352,11 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
and attributes like <code>script</code> or <span>event handler content attributes</span>.</p>

<pre><code class="idl">partial interface <span id="Element-partial">Element</span> {
[<span>CEReactions</span>] undefined <span data-x="dom-Element-setHTMLUnsafe">setHTMLUnsafe</span>(DOMString html);
[<span>CEReactions</span>] undefined <span data-x="dom-Element-setHTMLUnsafe">setHTMLUnsafe</span>(<code data-x="tt-htmlstring">HTMLString</code> html);
};

partial interface <span id="ShadowRoot-partial">ShadowRoot</span> {
[<span>CEReactions</span>] undefined <span data-x="dom-ShadowRoot-setHTMLUnsafe">setHTMLUnsafe</span>(DOMString html);
[<span>CEReactions</span>] undefined <span data-x="dom-ShadowRoot-setHTMLUnsafe">setHTMLUnsafe</span>(<code data-x="tt-htmlstring">HTMLString</code> html);
};</code></pre>

<div w-nodev>
Expand Down Expand Up @@ -117467,7 +117480,7 @@ interface <dfn interface>WorkerGlobalScope</dfn> : <span>EventTarget</span> {
readonly attribute <span>WorkerGlobalScope</span> <span data-x="dom-WorkerGlobalScope-self">self</span>;
readonly attribute <span>WorkerLocation</span> <span data-x="dom-WorkerGlobalScope-location">location</span>;
readonly attribute <span>WorkerNavigator</span> <span data-x="dom-worker-navigator">navigator</span>;
undefined <span data-x="dom-WorkerGlobalScope-importScripts">importScripts</span>(USVString... urls);
undefined <span data-x="dom-WorkerGlobalScope-importScripts">importScripts</span>(<code data-x="tt-scripturlstring">ScriptURLString</code>... urls);

attribute <span>OnErrorEventHandler</span> <span data-x="handler-WorkerGlobalScope-onerror">onerror</span>;
attribute <span>EventHandler</span> <span data-x="handler-WorkerGlobalScope-onlanguagechange">onlanguagechange</span>;
Expand Down Expand Up @@ -118322,7 +118335,7 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope

<pre><code class="idl">[Exposed=(Window,DedicatedWorker,SharedWorker)]
interface <dfn interface>Worker</dfn> : <span>EventTarget</span> {
<span data-x="dom-Worker">constructor</span>(USVString scriptURL, optional <span>WorkerOptions</span> options = {});
<span data-x="dom-Worker">constructor</span>(<code data-x="tt-scripturlstring">ScriptURLString</code> scriptURL, optional <span>WorkerOptions</span> options = {});

undefined <span data-x="dom-Worker-terminate">terminate</span>();

Expand Down Expand Up @@ -118461,7 +118474,7 @@ enum <dfn enum>WorkerType</dfn> { "classic", "module" };

<pre><code class="idl">[Exposed=Window]
interface <dfn interface>SharedWorker</dfn> : <span>EventTarget</span> {
<span data-x="dom-SharedWorker">constructor</span>(USVString scriptURL, optional (DOMString or <span>WorkerOptions</span>) options = {});
<span data-x="dom-SharedWorker">constructor</span>(<code data-x="tt-scripturlstring">ScriptURLString</code> scriptURL, optional (DOMString or <span>WorkerOptions</span>) options = {});

readonly attribute <span>MessagePort</span> <span data-x="dom-SharedWorker-port">port</span>;
};
Expand Down Expand Up @@ -142286,6 +142299,9 @@ INSERT INTERFACES HERE
<dt id="refsTOUCH">[TOUCH]</dt>
<dd><cite><a href="https://w3c.github.io/touch-events/">Touch Events</a></cite>, D. Schepers, S. Moon, M. Brubeck, A. Barstow, R. Byers. W3C.</dd>

<dt id="refsTRUSTED-TYPES">[TRUSTED-TYPES]</dt>
<dd><cite><a href="https://w3c.github.io/trusted-types/dist/spec">Trusted Types</a></cite>, K. Kotowicz, M. West. W3C.</dd>

<dt id="refsTZDATABASE">[TZDATABASE]</dt>
<dd>(Non-normative) <cite><a href="https://www.iana.org/time-zones">Time Zone Database</a></cite>. IANA.</dd>

Expand Down

0 comments on commit 309d8b4

Please sign in to comment.