Replace replace all with steps from replaceWith.#375
Replace replace all with steps from replaceWith.#375otherdaniel wants to merge 2 commits intoWICG:mainfrom
replace all with steps from replaceWith.#375Conversation
| @@ -904,7 +905,9 @@ beginning with |node|. It consistes of these steps: | |||
| [=SanitizerConfig/contains=] |elementName|: | |||
| 1. Call [=sanitize core=] on |child| with |configuration| and | |||
There was a problem hiding this comment.
My assumption was that the top-level list/iterate would have some sort of pass-by-value semantics, i.e. that the list at the time of the iteration is fixed. In that case this is needed, because otherwise the sanitizer would never see any of the children that are replacing their parents.
Spec text says:
To iterate over a list, performing a set of steps on each item in order, [...]
That doesn't strike me as very clear either way.
I also found this discussion, which seems to resolve this in favour of supporting modifications while iterating. But the promised PR from that discussion seems to not have materialized.
Not sure what to do here... by my reading of the current spec texts, I can't find a guarantee that modify during iterate would work as expected.
There was a problem hiding this comment.
whatwg/infra#451 exists but seems to have stalled.
ba2ec79 to
1c09b59
Compare
Replace
[=replace all=]with[=convert nodes into a node=]and[=replace=].Fixes: #372
Preview | Diff