It appears you can tune what is sanitized from the input via the "sanitizer" optional parameter. The default sanitizer is however defined in a spec linked on the docs page [1] with the actual sanitize operation specified as well [2].
[1] https://wicg.github.io/sanitizer-api/#dom-element-sethtml