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 19, 2024
1 parent a187fec commit 8a2505f
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4576,6 +4576,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://w3c.github.io/web-locks/#lock-request">lock requests</dfn></li>
</ul>
</dd>

<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-scripturlstring" data-x-href="https://w3c.github.io/trusted-types/dist/spec/#typedefdef-scripturlstring"><code>ScriptURLString</code></dfn></li>
</ul>
</dd>
</dl>

<hr>
Expand Down Expand Up @@ -10626,7 +10638,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>(<span data-x="tt-htmlstring">HTMLString</span> 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 +10667,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>(<span data-x="tt-htmlstring">HTMLString</span>... text);
[<span>CEReactions</span>] undefined <span data-x="dom-document-writeln">writeln</span>(<span data-x="tt-htmlstring">HTMLString</span>... text);

// <span>user interaction</span>
readonly attribute <span>WindowProxy</span>? <span data-x="dom-document-defaultView">defaultView</span>;
Expand Down Expand Up @@ -33014,7 +33026,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 <span data-x="tt-htmlstring">HTMLString</span> <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 @@ -112188,7 +112200,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>(<span data-x="tt-htmlstring">HTMLString</span> <var>string</var>, <span>DOMParserSupportedType</span> <var>type</var>);
};

enum <dfn enum>DOMParserSupportedType</dfn> {
Expand Down Expand Up @@ -112339,11 +112351,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>(<span data-x="tt-htmlstring">HTMLString</span> 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>(<span data-x="tt-htmlstring">HTMLString</span> html);
};</code></pre>

<div w-nodev>
Expand Down Expand Up @@ -117467,7 +117479,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>(<span data-x="tt-scripturlstring">ScriptURLString</span>... 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 +118334,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>(<span data-x="tt-scripturlstring">ScriptURLString</span> scriptURL, optional <span>WorkerOptions</span> options = {});

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

Expand Down Expand Up @@ -118461,7 +118473,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>(<span data-x="tt-scripturlstring">ScriptURLString</span> 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 +142298,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 8a2505f

Please sign in to comment.