- Sanitizer API for the browser.
- https://developer.mozilla.org/en-US/docs/Web/API/Sanitizer
- Experimental, see https://caniuse.com/mdn-api_sanitizer
Types
Sanitizer = ref object of JsRoot
- https://developer.mozilla.org/en-US/docs/Web/API/Sanitizer
Procs
func newSanitizer(): Sanitizer {.importjs: "(new Sanitizer(@))", ...raises: [], tags: [].}
func newSanitizer(allowComments, allowCustomElements: bool): Sanitizer {. importjs: "(new Sanitizer({allowComments: #, allowCustomElements: #}))", ...raises: [], tags: [].}
func newSanitizer(allowComments, allowCustomElements: bool; allowElements, blockElements, dropElements: seq[cstring]): Sanitizer {.importjs: "(new Sanitizer({allowComments: #, allowCustomElements: #, allowElements: #, blockElements: #, dropElements: #}))", ...raises: [], tags: [].}
func sanitizeFor(self: Sanitizer; element, input: cstring): Node {. importjs: "#.$1(#, #)", ...raises: [], tags: [].}