src/nodejs/jssanitizer

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 sanitize(self: Sanitizer; input: Node): Node {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
func sanitizeFor(self: Sanitizer; element, input: cstring): Node {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}