setComments

The setComments() method of the Sanitizer interface sets whether comments will be allowed or removed by the sanitizer.

MDN Reference