Skip to content

Commit b39ff59

Browse files
committed
stuff
1 parent 4d293ca commit b39ff59

1 file changed

Lines changed: 43 additions & 32 deletions

File tree

source

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -125761,7 +125761,7 @@ interface <dfn interface>Sanitizer</dfn> {
125761125761
<ol>
125762125762
<li><p>If <var>configuration</var>["<code
125763125763
data-x="dom-SanitizerConfig-removeProcessingInstructions">removeProcessingInstructions</code>"]
125764-
<span data-x="list contains">contains</span> <var>pi</var>, then:</p>
125764+
<span>sanitizer config list contains</span> <var>pi</var>, then:</p>
125765125765

125766125766
<ol>
125767125767
<li><p><span data-x="list remove">Remove</span> the item from <var>configuration</var>["<code
@@ -125820,7 +125820,7 @@ interface <dfn interface>Sanitizer</dfn> {
125820125820
<ol>
125821125821
<li><p>If <var>configuration</var>["<code
125822125822
data-x="dom-SanitizerConfig-removeProcessingInstructions">removeProcessingInstructions</code>"]
125823-
<span data-x="list contains">contains</span> <var>pi</var>, then return false.</p></li>
125823+
<span>sanitizer config list contains</span> <var>pi</var>, then return false.</p></li>
125824125824

125825125825
<li><p><span data-x="list append">Append</span> <var>pi</var> to
125826125826
<var>configuration</var>["<code
@@ -126012,8 +126012,6 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126012126012
boolean <dfn dict-member for="SanitizerConfig" data-x="dom-SanitizerConfig-dataAttributes">dataAttributes</dfn>;
126013126013
};</code></pre>
126014126014

126015-
TODO
126016-
126017126015
<h5>Configuration invariants</h5>
126018126016

126019126017
<p>Configurations can and ought to be modified by developers to suit their purposes. Options are
@@ -126413,7 +126411,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126413126411
<span data-x="map exists">exists</span>, then:</p>
126414126412

126415126413
<ol>
126416-
<li><p>Let <var>modified</var> be the result of <span>SanitizerConfig/remove</span>
126414+
<li><p>Let <var>modified</var> be the result of <span data-x="remove from sanitizer config list">removing</span>
126417126415
<var>element</var> from <var>configuration</var>["<code
126418126416
data-x="dom-SanitizerConfig-replaceWithChildrenElements">replaceWithChildrenElements</code>"].</p></li>
126419126417

@@ -126546,7 +126544,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126546126544
<li><p>If <var>element</var> is equal to <var>current element</var>, then return
126547126545
<var>modified</var>.</p></li>
126548126546

126549-
<li><p><span>SanitizerConfig/remove</span> <var>element</var> from
126547+
<li><p><span data-x="remove from sanitizer config list">Remove</span> <var>element</var> from
126550126548
<var>configuration</var>["<code
126551126549
data-x="dom-SanitizerConfig-elements">elements</code>"].</p></li>
126552126550

@@ -126567,15 +126565,15 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126567126565
data-x="dom-SanitizerElementNamespaceWithAttributes-removeAttributes">removeAttributes</code>"]
126568126566
(or an empty list if it does not exist) is not empty, then return false.</p></li>
126569126567

126570-
<li><p>Let <var>modified</var> be the result of <span>SanitizerConfig/remove</span>
126568+
<li><p>Let <var>modified</var> be the result of <span data-x="remove from sanitizer config list">removing</span>
126571126569
<var>element</var> from <var>configuration</var>["<code
126572126570
data-x="dom-SanitizerConfig-replaceWithChildrenElements">replaceWithChildrenElements</code>"].</p></li>
126573126571

126574126572
<li><p>If <var>configuration</var>["<code
126575126573
data-x="dom-SanitizerConfig-removeElements">removeElements</code>"] does not <span data-x="list
126576126574
contains">contain</span> <var>element</var>, then return <var>modified</var>.</p></li>
126577126575

126578-
<li><p><span>SanitizerConfig/remove</span> <var>element</var> from
126576+
<li><p><span data-x="remove from sanitizer config list">Remove</span> <var>element</var> from
126579126577
<var>configuration</var>["<code
126580126578
data-x="dom-SanitizerConfig-removeElements">removeElements</code>"].</p></li>
126581126579

@@ -126609,18 +126607,18 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126609126607
<li><p>If the <span>built-in non-replaceable elements list</span> <span data-x="list
126610126608
contains">contains</span> <var>element</var>, then return false.</p></li>
126611126609

126612-
<li><p>Let <var>modified</var> be the result of <span>SanitizerConfig/remove</span>
126610+
<li><p>Let <var>modified</var> be the result of <span data-x="remove from sanitizer config list">removing</span>
126613126611
<var>element</var> from <var>configuration</var>["<code
126614126612
data-x="dom-SanitizerConfig-elements">elements</code>"].</p></li>
126615126613

126616-
<li><p>If <span>SanitizerConfig/remove</span> <var>element</var> from
126614+
<li><p>If <span data-x="remove from sanitizer config list">removing</span> <var>element</var> from
126617126615
<var>configuration</var>["<code
126618126616
data-x="dom-SanitizerConfig-removeElements">removeElements</code>"] is true, then set
126619126617
<var>modified</var> to true.</p></li>
126620126618

126621126619
<li><p>If <var>configuration</var>["<code
126622126620
data-x="dom-SanitizerConfig-replaceWithChildrenElements">replaceWithChildrenElements</code>"]
126623-
does not <span data-x="list contains">contain</span> <var>element</var>, then:</p>
126621+
does not <span>sanitizer config list contains</span> <var>element</var>, then:</p>
126624126622

126625126623
<ol>
126626126624
<li><p><span data-x="list append">Append</span> <var>element</var> to
@@ -126673,8 +126671,8 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126673126671
<ol>
126674126672
<li><p>If <var>element</var>["<code
126675126673
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"] (or an
126676-
empty list if it does not exist) <span data-x="list contains">contains</span>
126677-
<var>attribute</var>, then <span data-x="list remove">remove</span> <var>attribute</var>
126674+
empty list if it does not exist) <span>sanitizer config list contains</span>
126675+
<var>attribute</var>, then <span data-x="remove from sanitizer config list">remove</span> <var>attribute</var>
126678126676
from <var>element</var>["<code
126679126677
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"].</p></li>
126680126678
</ol>
@@ -126697,7 +126695,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126697126695
data-x="dom-SanitizerConfig-removeAttributes">removeAttributes</code>"] does not <span
126698126696
data-x="list contains">contain</span> <var>attribute</var>, then return false.</p></li>
126699126697

126700-
<li><p><span>SanitizerConfig/remove</span> <var>attribute</var> from
126698+
<li><p><span data-x="remove from sanitizer config list">Remove</span> <var>attribute</var> from
126701126699
<var>configuration</var>["<code
126702126700
data-x="dom-SanitizerConfig-removeAttributes">removeAttributes</code>"].</p></li>
126703126701

@@ -126929,7 +126927,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126929126927
<ol>
126930126928
<li><p>If <var>configuration</var>["<code
126931126929
data-x="dom-SanitizerConfig-processingInstructions">processingInstructions</code>"] does
126932-
not <span data-x="list contains">contain</span> <var>piTarget</var>, then <span
126930+
not <span>sanitizer config list contains</span> <var>piTarget</var>, then <span
126933126931
data-x="list remove">remove</span> <var>child</var>.</p></li>
126934126932
</ol>
126935126933
</li>
@@ -126938,7 +126936,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126938126936
<ol>
126939126937
<li><p>If <var>configuration</var>["<code
126940126938
data-x="dom-SanitizerConfig-removeProcessingInstructions">removeProcessingInstructions</code>"]
126941-
<span data-x="list contains">contains</span> <var>piTarget</var>, then <span data-x="list
126939+
<span>sanitizer config list contains</span> <var>piTarget</var>, then <span data-x="list
126942126940
remove">remove</span> <var>child</var>.</p></li>
126943126941
</ol>
126944126942
</li>
@@ -126955,7 +126953,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
126955126953
data-x="dom-SanitizerConfig-replaceWithChildrenElements">replaceWithChildrenElements</code>"]
126956126954
<span data-x="map exists">exists</span> and <var>configuration</var>["<code
126957126955
data-x="dom-SanitizerConfig-replaceWithChildrenElements">replaceWithChildrenElements</code>"]
126958-
<span data-x="list contains">contains</span> <var>elementName</var>, then:</p>
126956+
<span>sanitizer config list contains</span> <var>elementName</var>, then:</p>
126959126957

126960126958
<ol>
126961126959
<li><p><span>Assert</span>: <var>node</var> is not a <code>Document</code>.</p></li>
@@ -127022,7 +127020,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127022127020
data-x="dom-SanitizerElementNamespaceWithAttributes-removeAttributes">removeAttributes</code>"]
127023127021
<span data-x="map exists">exists</span> and <var>elementWithLocalAttributes</var>["<code
127024127022
data-x="dom-SanitizerElementNamespaceWithAttributes-removeAttributes">removeAttributes</code>"]
127025-
<span data-x="list contains">contains</span> <var>attrName</var>, then <span>remove an
127023+
<span>sanitizer config list contains</span> <var>attrName</var>, then <span>remove an
127026127024
attribute</span> <var>attribute</var>.</p></li>
127027127025

127028127026
<li><p>Otherwise, if <var>configuration</var>["<code
@@ -127035,7 +127033,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127035127033
contains">contain</span> <var>attrName</var> and
127036127034
<var>elementWithLocalAttributes</var>["<code
127037127035
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"] does
127038-
not <span data-x="list contains">contain</span> <var>attrName</var>, and if "<code
127036+
not <span>sanitizer config list contains</span> <var>attrName</var>, and if "<code
127039127037
data-x="">data-</code>" is not a prefix of <var>attribute</var>'s <span
127040127038
data-x="concept-attribute-local-name">local name</span> or <var>attribute</var>'s <span
127041127039
data-x="concept-attribute-namespace">namespace</span> is not null or
@@ -127051,7 +127049,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127051127049
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"] <span
127052127050
data-x="map exists">exists</span> and <var>elementWithLocalAttributes</var>["<code
127053127051
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"] does
127054-
not <span data-x="list contains">contain</span> <var>attrName</var>, then <span>remove an
127052+
not <span>sanitizer config list contains</span> <var>attrName</var>, then <span>remove an
127055127053
attribute</span> <var>attribute</var>.</p></li>
127056127054

127057127055
<li><p>Otherwise, if <var>configuration</var>["<code
@@ -127250,7 +127248,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127250127248
<li><p>Set <var>element</var> to the result of <span>canonicalize a sanitizer element</span> with
127251127249
<var>element</var>.</p></li>
127252127250

127253-
<li><p>Let <var>modified</var> be the result of <span>SanitizerConfig/remove</span>
127251+
<li><p>Let <var>modified</var> be the result of <span data-x="remove from sanitizer config list">removing</span>
127254127252
<var>element</var> from <var>configuration</var>["<code
127255127253
data-x="dom-SanitizerConfig-replaceWithChildrenElements">replaceWithChildrenElements</code>"].</p></li>
127256127254

@@ -127263,7 +127261,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127263127261
contains">contains</span> <var>element</var>, then:</p>
127264127262

127265127263
<ol>
127266-
<li><p><span>SanitizerConfig/remove</span> <var>element</var> from
127264+
<li><p><span data-x="remove from sanitizer config list">Remove</span> <var>element</var> from
127267127265
<var>configuration</var>["<code
127268127266
data-x="dom-SanitizerConfig-elements">elements</code>"].</p></li>
127269127267

@@ -127308,7 +127306,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127308127306
exists">exists</span>, then:</p>
127309127307

127310127308
<ol>
127311-
<li><p>Let <var>modified</var> be the result of <span>SanitizerConfig/remove</span>
127309+
<li><p>Let <var>modified</var> be the result of <span data-x="remove from sanitizer config list">removing</span>
127312127310
<var>attribute</var> from <var>configuration</var>["<code
127313127311
data-x="dom-SanitizerConfig-attributes">attributes</code>"].</p></li>
127314127312

@@ -127323,7 +127321,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127323127321
<ol>
127324127322
<li><p>If <var>element</var>["<code
127325127323
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"] (or an
127326-
empty list if it does not exist) <span data-x="list contains">contains</span>
127324+
empty list if it does not exist) <span>sanitizer config list contains</span>
127327127325
<var>attribute</var>, then:</p>
127328127326

127329127327
<ol>
@@ -127337,7 +127335,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127337127335

127338127336
<li><p>If <var>element</var>["<code
127339127337
data-x="dom-SanitizerElementNamespaceWithAttributes-removeAttributes">removeAttributes</code>"]
127340-
(or an empty list if it does not exist) <span data-x="list contains">contains</span>
127338+
(or an empty list if it does not exist) <span>sanitizer config list contains</span>
127341127339
<var>attribute</var>, then:</p>
127342127340

127343127341
<ol>
@@ -127375,15 +127373,15 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127375127373
<ol>
127376127374
<li><p>If <var>element</var>["<code
127377127375
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"] (or an
127378-
empty list if it does not exist) <span data-x="list contains">contains</span>
127379-
<var>attribute</var>, then <span data-x="list remove">remove</span> <var>attribute</var>
127376+
empty list if it does not exist) <span>sanitizer config list contains</span>
127377+
<var>attribute</var>, then <span data-x="remove from sanitizer config list">remove</span> <var>attribute</var>
127380127378
from <var>element</var>["<code
127381127379
data-x="dom-SanitizerElementNamespaceWithAttributes-attributes">attributes</code>"].</p></li>
127382127380

127383127381
<li><p>If <var>element</var>["<code
127384127382
data-x="dom-SanitizerElementNamespaceWithAttributes-removeAttributes">removeAttributes</code>"]
127385-
(or an empty list if it does not exist) <span data-x="list contains">contains</span>
127386-
<var>attribute</var>, then <span data-x="list remove">remove</span> <var>attribute</var>
127383+
(or an empty list if it does not exist) <span>sanitizer config list contains</span>
127384+
<var>attribute</var>, then <span data-x="remove from sanitizer config list">remove</span> <var>attribute</var>
127387127385
from <var>element</var>["<code
127388127386
data-x="dom-SanitizerElementNamespaceWithAttributes-removeAttributes">removeAttributes</code>"].</p></li>
127389127387
</ol>
@@ -127444,7 +127442,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127444127442
</div>
127445127443

127446127444
<div algorithm>
127447-
<p>To <dfn>SanitizerConfig/remove</dfn> an <var>item</var> from a list <var>list</var>:</p>
127445+
<p>To <dfn>remove from sanitizer config list</dfn> given an <var>item</var> and a <var>list</var>:</p>
127448127446

127449127447
<ol>
127450127448
<li><p>Let <var>removed</var> be false.</p></li>
@@ -127460,7 +127458,7 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127460127458
member, then:</p>
127461127459

127462127460
<ol>
127463-
<li><p><span data-x="list remove">remove</span> <var>entry</var> from
127461+
<li><p><span data-x="remove from sanitizer config list">Remove</span> <var>entry</var> from
127464127462
<var>list</var>.</p></li>
127465127463

127466127464
<li><p>Set <var>removed</var> to true.</p></li>
@@ -127473,11 +127471,24 @@ dictionary <dfn dictionary>SanitizerConfig</dfn> {
127473127471
</ol>
127474127472
</div>
127475127473

127474+
<div algorithm>
127475+
<p>To <dfn>sanitizer config list contains</dfn>, given an item <var>item</var> and a list <var>list</var>:</p>
127476+
<ol>
127477+
<li><p><span data-x="list iterate">For each</span> <var>entry</var> of <var>list</var>:</p>
127478+
<ol>
127479+
<li><p>If <var>item</var> has a <code data-x="dom-SanitizerProcessingInstruction-target">target</code> member, and <var>entry</var> has a matching <code data-x="dom-SanitizerProcessingInstruction-target">target</code> member, then return true.</p></li>
127480+
<li><p>Otherwise, if <var>item</var>'s <code data-x="dom-SanitizerElementNamespace-name">name</code> member is equal to <var>entry</var>'s <code data-x="dom-SanitizerElementNamespace-name">name</code> member and <var>item</var>'s <code data-x="dom-SanitizerElementNamespace-namespace">_namespace</code> member is equal to <var>entry</var>'s <code data-x="dom-SanitizerElementNamespace-namespace">_namespace</code> member, then return true.</p></li>
127481+
</ol>
127482+
</li>
127483+
<li><p>Return false.</p></li>
127484+
</ol>
127485+
</div>
127486+
127476127487
<div algorithm>
127477127488
<p>To <dfn>SanitizerConfig/add</dfn> a <var>name</var> to a list <var>list</var>:</p>
127478127489

127479127490
<ol>
127480-
<li><p>If <var>list</var> <span data-x="list contains">contains</span> <var>name</var>, then
127491+
<li><p>If <var>list</var> <span>sanitizer config list contains</span> <var>name</var>, then
127481127492
return.</p></li>
127482127493

127483127494
<li><p><span data-x="list append">Append</span> <var>name</var> to <var>list</var>.</p></li>

0 commit comments

Comments
 (0)