From da328f4e1fb5c69e755112064811a19f0b73ca41 Mon Sep 17 00:00:00 2001 From: Daniel <30862698+otherdaniel@users.noreply.github.com> Date: Wed, 14 Sep 2022 10:58:07 +0200 Subject: [PATCH] git squash commit for nit-this-again. (#174) 6bd13f6ebccddadfb9bb77380c935e0be1b0bb1e This reference. 577af7ba0a15547e557ef5c24457362824a87dab wip f393bd3be7cb901272f40d83e7b6c9a8d764d0a7 more --- index.bs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index ff7d79b..7ac8202 100644 --- a/index.bs +++ b/index.bs @@ -24,6 +24,7 @@ WPT Path Prefix: /sanitizer-api/ text: innerHTML; type: attribute; for: Element; url: https://dom.spec.whatwg.org/#widl-Element-innerHTML text: window.toStaticHTML(); type: method; url: https://msdn.microsoft.com/en-us/library/cc848922(v=vs.85).aspx text: createDocumentFragment; type: method; url: https://dom.spec.whatwg.org/#dom-document-createdocumentfragment +text: template contents; type: dfn; url: https://html.spec.whatwg.org/#template-contents
 {
@@ -292,8 +293,8 @@ handle additional, application-specific use cases.
 
 * The 
     new Sanitizer(config) constructor steps
-    are to run the [=create a sanitizer=] algorithm steps with |config| and this as
-    parameter.
+    are to run the [=create a sanitizer=] algorithm steps on [=this=] with
+    |config| as parameter.
 * The sanitize(input)
     method steps are to return the result of running the [=sanitize=]
     algorithm on |input|,
@@ -710,12 +711,11 @@ sanitizer-names.https.html
 
To create a Sanitizer with an optional |config| parameter, run these steps: - 1. Let |sanitizer| be a newly created Sanitizer instance. 1. Create a copy of |config|. 1. Normalize all element names in |config|'s copy by running the [=normalize element name=] algorithm on each of them. 1. Remove all element names that were normalized to `null`. - 1. Return |sanitizer|, with |config|'s copy as its [=configuration dictionary=]. + 1. Set |config| as [=this=]'s [=configuration dictionary=]. Issue(148): This should explicitly state the config's properties in which element names are found and modify the config wih map operations.
@@ -779,9 +779,9 @@ Issue(140): Does the `.sanitizeFor` element name require namespace-related proce
To sanitize and set a |value| using an -{{SetHTMLOptions}} |options| dictionary on an {{Element}} node |this|, +{{SetHTMLOptions}} |options| dictionary on an {{Element}} node [=this=], run these steps: - 1. If the [=element kind=] of |this| is `regular` and |this| does not + 1. If the [=element kind=] of [=this=] is `regular` and [=this=]' [=Element/local name=] does not [=element matches an element name|match=] any name in the [=baseline element allow list=], then throw a {{TypeError}} and return. 1. If the {{sanitizer}} member [=map/exists=] in the |options| @@ -792,10 +792,10 @@ run these steps: algorithm without a `config` parameter. 1. Let |fragment| be the result of invoking the [html fragment parsing algorithm](https://w3c.github.io/DOM-Parsing/#dfn-fragment-parsing-algorithm) - with |this| as the `context node` and |value| as `markup`. + with [=this=] as the `context node` and |value| as `markup`. 1. Run the steps if the [=sanitize a document fragment=] algorithm on |fragment|, using |sanitizer| as the current {{Sanitizer}} instance. - 1. [=Replace all=] with |fragment| as the `node` and |this| as the `parent`. + 1. [=Replace all=] with |fragment| as the `node` and [=this=] as the `parent`. element-set-sanitized-html.https.html @@ -851,7 +851,7 @@ To sanitize a document fragment named |fragment| with a {{Sanitizer}} 1. [=map/Set=] |m|[|node|] to |action|. 1. [=list/iterate|For each=] |node| in |nodes|: 1. If |m|[|node|] is `drop`, [=/remove=] |node|. - 1. If |m|[|node|] is `block`, invoke [=Replace with=] with |node| as |this| and |node|'s [=tree/children=] as |nodes|. + 1. If |m|[|node|] is `block`, invoke [=Replace with=] with |node| as [=this=] and |node|'s [=tree/children=] as |nodes|. 1. If |m|[|node|] is `keep`, do nothing.