Table of Contents

Class SanitizerConfig

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The SanitizerConfig dictionary of the HTML Sanitizer API represents a sanitizer configuration object.
The configuration specifies what elements, attributes and comments are allowed or should be removed when inserting strings of HTML into an Element or ShadowRoot, or when parsing an HTML string into a Document.
[ToObject]
public class SanitizerConfig
Inheritance
SanitizerConfig
Inherited Members

Remarks

An instance of this type can be passed to the Sanitizer(Union128) constructor to configure a Sanitizer, and is returned by 'Sanitizer.Get'.
It can also be passed as the option.sanitizer parameter when calling the sanitization methods:

Note that normally a Sanitizer instance would be passed as the option instead of SanitizerConfig in the above methods, in particular because sanitizer instances are more efficient to share and modify.

See also on MDN

Constructors

SanitizerConfig()

public SanitizerConfig()

Fields

Attributes

[Value("attributes")]
public List<Union131> Attributes

Field Value

List<Union131>

Comments

[Value("comments")]
public bool Comments

Field Value

bool

DataAttributes

[Value("dataAttributes")]
public bool DataAttributes

Field Value

bool

Elements

[Value("elements")]
public List<Union130> Elements

Field Value

List<Union130>

RemoveAttributes

[Value("removeAttributes")]
public List<Union131> RemoveAttributes

Field Value

List<Union131>

RemoveElements

[Value("removeElements")]
public List<Union129> RemoveElements

Field Value

List<Union129>

ReplaceWithChildrenElements

[Value("replaceWithChildrenElements")]
public List<Union129> ReplaceWithChildrenElements

Field Value

List<Union129>