Class SanitizerConfig
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalSanitizerConfig 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.
Constructors
SanitizerConfig()
public SanitizerConfig()
Fields
Attributes
[Value("attributes")]
public List<Union131> Attributes
Field Value
Comments
[Value("comments")]
public bool Comments
Field Value
DataAttributes
[Value("dataAttributes")]
public bool DataAttributes
Field Value
Elements
[Value("elements")]
public List<Union130> Elements
Field Value
RemoveAttributes
[Value("removeAttributes")]
public List<Union131> RemoveAttributes
Field Value
RemoveElements
[Value("removeElements")]
public List<Union129> RemoveElements
Field Value
ReplaceWithChildrenElements
[Value("replaceWithChildrenElements")]
public List<Union129> ReplaceWithChildrenElements