@@ -124689,10 +124689,10 @@ partial interface <span id="ShadowRoot-partial">ShadowRoot</span> {
124689124689
124690124690enum <dfn enum>SanitizerPresets</dfn> { "<dfn data-x="dom-SanitizerPresets-default">default</dfn>" };
124691124691dictionary <dfn dictionary>SetHTMLOptions</dfn> {
124692- (<span data-x="dom-Sanitizer" >Sanitizer</span> or <span>SanitizerConfig</span> or <span>SanitizerPresets</span>) <dfn dict-member for="SetHTMLOptions" data-x="dom-SetHTMLOptions-sanitizer">sanitizer</dfn> = "<span data-x="dom-SanitizerPresets-default">default</span>";
124692+ (<span>Sanitizer</span> or <span>SanitizerConfig</span> or <span>SanitizerPresets</span>) <dfn dict-member for="SetHTMLOptions" data-x="dom-SetHTMLOptions-sanitizer">sanitizer</dfn> = "<span data-x="dom-SanitizerPresets-default">default</span>";
124693124693};
124694124694dictionary <dfn dictionary>SetHTMLUnsafeOptions</dfn> {
124695- (<span data-x="dom-Sanitizer" >Sanitizer</span> or <span>SanitizerConfig</span> or <span>SanitizerPresets</span>) <dfn dict-member for="SetHTMLOptions" data-x="dom-SetHTMLUnsafeOptions-sanitizer">sanitizer</dfn> = {};
124695+ (<span>Sanitizer</span> or <span>SanitizerConfig</span> or <span>SanitizerPresets</span>) <dfn dict-member for="SetHTMLOptions" data-x="dom-SetHTMLUnsafeOptions-sanitizer">sanitizer</dfn> = {};
124696124696};
124697124697
124698124698dictionary <dfn dictionary>GetHTMLOptions</dfn> {
@@ -125679,31 +125679,31 @@ interface <dfn interface>XMLSerializer</dfn> {
125679125679 data-x="dom-DOMParser-parseFromString">parseFromString()</code>.</p></dd>
125680125680 </dl>
125681125681
125682- <h4>The <code data-x="dom-Sanitizer" >Sanitizer</code> interface</h4>
125682+ <h4>The <code>Sanitizer</code> interface</h4>
125683125683
125684125684 <pre><code class="idl">[Exposed=Window]
125685- interface <dfn interface data-x="dom-Sanitizer" >Sanitizer</dfn> {
125686- constructor(optional (SanitizerConfig or SanitizerPresets) configuration = "default");
125685+ interface <dfn interface>Sanitizer</dfn> {
125686+ constructor(optional (<span> SanitizerConfig</span> or <span> SanitizerPresets</span> ) configuration = "default");
125687125687
125688125688 // Query configuration:
125689- SanitizerConfig get();
125689+ <span> SanitizerConfig</span> <span data-x="dom-Sanitizer- get">get</span> ();
125690125690
125691125691 // Modify a Sanitizer's lists and fields:
125692- boolean allowElement( SanitizerElementWithAttributes element);
125693- boolean removeElement( SanitizerElement element);
125694- boolean replaceElementWithChildren( SanitizerElement element);
125695- boolean allowProcessingInstruction(SanitizerPI pi);
125696- boolean removeProcessingInstruction(SanitizerPI pi);
125697- boolean allowAttribute( SanitizerAttribute attribute);
125698- boolean removeAttribute( SanitizerAttribute attribute);
125699- boolean setComments(boolean allow);
125700- boolean setDataAttributes(boolean allow);
125692+ boolean <span data-x="dom-Sanitizer- allowElement">allowElement</span>(<span> SanitizerElementWithAttributes</span> element);
125693+ boolean <span data-x="dom-Sanitizer- removeElement">removeElement</span>(<span> SanitizerElement</span> element);
125694+ boolean <span data-x="dom-Sanitizer- replaceElementWithChildren">replaceElementWithChildren</span>(<span> SanitizerElement</span> element);
125695+ boolean <span data-x="dom-Sanitizer- allowProcessingInstruction">allowProcessingInstruction</span>(<span>SanitizerProcessingInstruction</span> pi);
125696+ boolean <span data-x="dom-Sanitizer- removeProcessingInstruction">removeProcessingInstruction</span>(<span>SanitizerProcessingInstruction</span> pi);
125697+ boolean <span data-x="dom-Sanitizer- allowAttribute">allowAttribute</span>(<span> SanitizerAttribute</span> attribute);
125698+ boolean <span data-x="dom-Sanitizer- removeAttribute">removeAttribute</span>(<span> SanitizerAttribute</span> attribute);
125699+ boolean <span data-x="dom-Sanitizer- setComments">setComments</span> (boolean allow);
125700+ boolean <span data-x="dom-Sanitizer- setDataAttributes">setDataAttributes</span> (boolean allow);
125701125701
125702125702 // Remove markup that executes script.
125703- boolean removeUnsafe();
125703+ boolean <span data-x="dom-Sanitizer- removeUnsafe">removeUnsafe</span> ();
125704125704};</code></pre>
125705125705
125706- <p>A <code data-x="dom-Sanitizer" >Sanitizer</code> has an associated <dfn for="Sanitizer">configuration</dfn> (a
125706+ <p>A <code>Sanitizer</code> has an associated <dfn for="Sanitizer">configuration</dfn> (a
125707125707 <span>SanitizerConfig</span>).</p>
125708125708
125709125709 <div algorithm>
@@ -125767,7 +125767,8 @@ interface <dfn interface data-x="dom-Sanitizer">Sanitizer</dfn> {
125767125767 <li><p><span data-x="list remove">Remove</span> the item from <var>configuration</var>["<code
125768125768 data-x="dom-SanitizerConfig-removeProcessingInstructions">removeProcessingInstructions</code>"]
125769125769 whose <code data-x="dom-SanitizerProcessingInstruction-target">target</code> member is
125770- <var>pi</var>'s <code data-x="dom-SanitizerProcessingInstruction-target">target</code>.</p></li>
125770+ <var>pi</var>'s <code
125771+ data-x="dom-SanitizerProcessingInstruction-target">target</code>.</p></li>
125771125772
125772125773 <li><p>Return true.</p></li>
125773125774 </ol>
@@ -125803,7 +125804,8 @@ interface <dfn interface data-x="dom-Sanitizer">Sanitizer</dfn> {
125803125804 <li><p><span data-x="list remove">Remove</span> the item from <var>configuration</var>["<code
125804125805 data-x="dom-SanitizerConfig-processingInstructions">processingInstructions</code>"] whose
125805125806 <code data-x="dom-SanitizerProcessingInstruction-target">target</code> member is
125806- <var>pi</var>'s <code data-x="dom-SanitizerProcessingInstruction-target">target</code>.</p></li>
125807+ <var>pi</var>'s <code
125808+ data-x="dom-SanitizerProcessingInstruction-target">target</code>.</p></li>
125807125809
125808125810 <li><p>Return true.</p></li>
125809125811 </ol>
@@ -125832,7 +125834,7 @@ interface <dfn interface data-x="dom-Sanitizer">Sanitizer</dfn> {
125832125834
125833125835 <div algorithm>
125834125836 <p>To <dfn for="Sanitizer">set a configuration</dfn>, given a dictionary <var>configuration</var>,
125835- a boolean <var>allowCommentsPIsAndDataAttributes</var>, and a <code data-x="dom-Sanitizer" >Sanitizer</code>
125837+ a boolean <var>allowCommentsPIsAndDataAttributes</var>, and a <code>Sanitizer</code>
125836125838 <var>sanitizer</var>:</p>
125837125839
125838125840 <ol>
@@ -125914,11 +125916,12 @@ interface <dfn interface data-x="dom-Sanitizer">Sanitizer</dfn> {
125914125916 </li>
125915125917
125916125918 <li><p>If <var>configuration</var>["<code data-x="dom-SanitizerConfig-comments">comments</code>"]
125917- does not <span data-x="map exists">exist</span>, set it to <var>allowCommentsPIsAndDataAttributes</var>.</p></li>
125919+ does not <span data-x="map exists">exist</span>, set it to
125920+ <var>allowCommentsPIsAndDataAttributes</var>.</p></li>
125918125921
125919125922 <li><p>If <var>configuration</var>["<code
125920- data-x="dom-SanitizerConfig-dataAttributes">dataAttributes</code>"] does not <span data-x="map exists">exist</span>,
125921- set it to <var>allowCommentsPIsAndDataAttributes</var>.</p></li>
125923+ data-x="dom-SanitizerConfig-dataAttributes">dataAttributes</code>"] does not <span data-x="map
125924+ exists">exist</span>, set it to <var>allowCommentsPIsAndDataAttributes</var>.</p></li>
125922125925 </ol>
125923125926 </div>
125924125927
@@ -126015,10 +126018,10 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126015126018
126016126019 <p>Configurations can and ought to be modified by developers to suit their purposes. Options are
126017126020 to write a new <code>SanitizerConfig</code> dictionary from scratch, to modify an existing
126018- <code data-x="dom-Sanitizer" >Sanitizer</code>'s configuration by using the modifier methods, or to <code
126019- data-x="dom-Sanitizer-get">get()</code> an existing <code data-x="dom-Sanitizer" >Sanitizer</code>'s
126021+ <code>Sanitizer</code>'s configuration by using the modifier methods, or to <code
126022+ data-x="dom-Sanitizer-get">get()</code> an existing <code>Sanitizer</code>'s
126020126023 <span>configuration</span> as a dictionary and modify the dictionary and then create a new
126021- <code data-x="dom-Sanitizer" >Sanitizer</code> with it.</p>
126024+ <code>Sanitizer</code> with it.</p>
126022126025
126023126026 <p>An empty configuration allows everything (when called with the "unsafe" methods like <code
126024126027 data-x="dom-Element-setHTMLUnsafe">setHTMLUnsafe()</code>). A configuration "<code
@@ -126251,7 +126254,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126251126254 steps are:</p>
126252126255
126253126256 <p class="note">Outside of the <code data-x="dom-Sanitizer-get">get()</code> method, the order of
126254- the <code data-x="dom-Sanitizer" >Sanitizer</code>'s elements and attributes is unobservable. By explicitly sorting the
126257+ the <code>Sanitizer</code>'s elements and attributes is unobservable. By explicitly sorting the
126255126258 result of this method, we give implementations the opportunity to optimize by, for example, using
126256126259 unordered sets internally.</p>
126257126260
@@ -126265,8 +126268,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126265126268 data-x="map exists">exists</span>, then:</p>
126266126269
126267126270 <ol>
126268- <li><p><span data-x="list iterate">For any</span> <var>element</var> of <var>config</var>["<code
126269- data-x="dom-SanitizerConfig-elements">elements</code>"]:</p>
126271+ <li><p><span data-x="list iterate">For any</span> <var>element</var> of
126272+ <var>config</var>["<code data-x="dom-SanitizerConfig-elements">elements</code>"]:</p>
126270126273
126271126274 <ol>
126272126275 <li><p>If <var>element</var>["<code
@@ -126298,8 +126301,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126298126301 <li><p>Otherwise:</p>
126299126302 <ol>
126300126303 <li><p>Set <var>config</var>["<code
126301- data-x="dom-SanitizerConfig-removeElements">removeElements</code>"] to the result of <span data-x="list sort">sort
126302- in ascending order</span> <var>config</var>["<code
126304+ data-x="dom-SanitizerConfig-removeElements">removeElements</code>"] to the result of <span
126305+ data-x="list sort">sort in ascending order</span> <var>config</var>["<code
126303126306 data-x="dom-SanitizerConfig-removeElements">removeElements</code>"], with <var>elementA</var>
126304126307 being <span>less than item</span> <var>elementB</var>.</p></li>
126305126308 </ol>
@@ -126338,8 +126341,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126338126341
126339126342 <li><p>If <var>config</var>["<code data-x="dom-SanitizerConfig-attributes">attributes</code>"]
126340126343 <span data-x="map exists">exists</span>, then set <var>config</var>["<code
126341- data-x="dom-SanitizerConfig-attributes">attributes</code>"] to the result of <span data-x="list sort">sort in
126342- ascending order</span> <var>config</var>["<code
126344+ data-x="dom-SanitizerConfig-attributes">attributes</code>"] to the result of <span data-x="list
126345+ sort">sort in ascending order</span> <var>config</var>["<code
126343126346 data-x="dom-SanitizerConfig-attributes">attributes</code>"], with <var>attrA</var> being
126344126347 <span>less than item</span> <var>attrB</var>.</p></li>
126345126348
@@ -126833,7 +126836,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126833126836 <span data-x="map exists">exists</span>, then set <var>sanitizerSpec</var> to
126834126837 <var>options</var>["<code data-x="dom-SetHTMLOptions-sanitizer">sanitizer</code>"].</p></li>
126835126838
126836- <li><p><span>Assert</span>: <var>sanitizerSpec</var> is either a <code data-x="dom-Sanitizer" >Sanitizer</code> instance,
126839+ <li><p><span>Assert</span>: <var>sanitizerSpec</var> is either a <code>Sanitizer</code> instance,
126837126840 a <span>SanitizerPresets</span> member, or a <span>SanitizerConfig</span> dictionary.</p></li>
126838126841
126839126842 <li><p>If <var>sanitizerSpec</var> is a string, then:</p>
@@ -126850,13 +126853,13 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126850126853 <li><p>If <var>sanitizerSpec</var> is a dictionary, then:</p>
126851126854
126852126855 <ol>
126853- <li><p>Let <var>sanitizer</var> be a new <code data-x="dom-Sanitizer" >Sanitizer</code> instance.</p></li>
126856+ <li><p>Let <var>sanitizer</var> be a new <code>Sanitizer</code> instance.</p></li>
126854126857
126855126858 <li><p>Let <var>inverseSafe</var> be true if <var>safe</var> is false; false otherwise.
126856126859
126857- <li><p>If the result of <span data-x="set a configuration">setting a configuration </span> <var>sanitizerSpec</var> with (<var>inverseSafe</var>)
126858- and <var>sanitizer</var> is false, then throw a
126859- <code>TypeError</code>.</p></li>
126860+ <li><p>If the result of <span data-x="set a configuration">setting a configuration </span>
126861+ <var>sanitizerSpec</var> with (<var>inverseSafe</var>) and <var>sanitizer</var> is false, then
126862+ throw a <code>TypeError</code>.</p></li>
126860126863
126861126864 <li><p>Set <var>sanitizerSpec</var> to <var>sanitizer</var>.</p></li>
126862126865 </ol>
@@ -126867,7 +126870,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126867126870 </div>
126868126871
126869126872 <div algorithm>
126870- <p>To <dfn>sanitize</dfn> a <code>node</code> <var>node</var> with a <code data-x="dom-Sanitizer" >Sanitizer</code>
126873+ <p>To <dfn>sanitize</dfn> a <code>node</code> <var>node</var> with a <code>Sanitizer</code>
126871126874 <var>sanitizer</var> and a boolean <var>safe</var>:</p>
126872126875
126873126876 <ol>
@@ -126892,8 +126895,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126892126895 <var>node</var>. It consists of these steps:</p>
126893126896
126894126897 <ol>
126895- <li><p><span data-x="list iterate">For each</span> <var>child</var> of <var>node</var>'s
126896- <span data-x="concept-tree-child">children</span>:</p>
126898+ <li><p><span data-x="list iterate">For each</span> <var>child</var> of <var>node</var>'s <span
126899+ data-x="concept-tree-child">children</span>:</p>
126897126900
126898126901 <ol>
126899126902 <li><p><span>Assert</span>: <var>child</var> is a <code>Text</code>, <code>Comment</code>,
@@ -126917,7 +126920,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126917126920 <li><p>If <var>child</var> is a <code>ProcessingInstruction</code> node, then:</p>
126918126921
126919126922 <ol>
126920- <li><p>Let <var>piTarget</var> be <var>child</var>'s <span data-x="dom-ProcessingInstruction-target">target</span>.</p></li>
126923+ <li><p>Let <var>piTarget</var> be <var>child</var>'s <span
126924+ data-x="dom-ProcessingInstruction-target">target</span>.</p></li>
126921126925
126922126926 <li><p>If <var>configuration</var>["<code
126923126927 data-x="dom-SanitizerConfig-processingInstructions">processingInstructions</code>"] <span
@@ -126960,8 +126964,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126960126964 <li><p>Call <span>sanitize core</span> on <var>child</var> with <var>configuration</var>
126961126965 and <var>handleJavascriptNavigationUrls</var>.</p></li>
126962126966
126963- <li><p><span data-x="concept-node-replace-all">Replace all</span> with <var>child</var>'s <span data-x="concept-tree-child">children</span> within
126964- <var>child</var>.</p></li>
126967+ <li><p><span data-x="concept-node-replace-all">Replace all</span> with <var>child</var>'s
126968+ <span data-x="concept-tree-child">children</span> within < var>child</var>.</p></li>
126965126969
126966126970 <li><p><span>Continue</span>.</p></li>
126967126971 </ol>
@@ -127102,8 +127106,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127102127106
127103127107 <li><p>If <var>url</var> is failure, then return false.</p></li>
127104127108
127105- <li><p>Return whether <var>url</var>'s <span
127106- data-x="concept-url-scheme">scheme</span> is "<code
127109+ <li><p>Return whether <var>url</var>'s <span data-x="concept-url-scheme">scheme</span> is "<code
127107127110 data-x="">javascript</code>".</p></li>
127108127111 </ol>
127109127112 </div>
@@ -127428,8 +127431,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127428127431 </ol>
127429127432 </li>
127430127433
127431- <li><p><span data-x="list iterate">For each</span> <var>attribute</var> that is an <span data-x="event handler content attributes">event
127432- handler content attribute</span>:</p>
127434+ <li><p><span data-x="list iterate">For each</span> <var>attribute</var> that is an <span
127435+ data-x="event handler content attributes">event handler content attribute</span>:</p>
127433127436
127434127437 <ol>
127435127438 <li><p>If <span>remove an attribute</span> <var>attribute</var> from <var>configuration</var>
@@ -127828,8 +127831,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127828127831
127829127832 <div algorithm>
127830127833 <p>The <dfn>intersection</dfn> of two lists <var>A</var> and <var>B</var> containing
127831- <span>SanitizerElement</span> or <span>SanitizerAttribute</span> items is a <span>list</span> containing
127832- all items that are present in both <var>A</var> and <var>B</var>.</p>
127834+ <span>SanitizerElement</span> or <span>SanitizerAttribute</span> items is a <span>list</span>
127835+ containing all items that are present in both <var>A</var> and <var>B</var>.</p>
127833127836 </div>
127834127837
127835127838 <div algorithm>
0 commit comments