// Create sanitizer (in this case the default)
const sanitizer = new Sanitizer();
// Allow comments
sanitizer.setComments(true);
// Remove comments
sanitizer.setComments(false);Sanitizer: setComments() method / notebook
Sanitizer: setComments() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.