eslint-plugin

@masknet/browser/no-set-html

Disallow use Element#{inner,outer}HTML

Rule Details

:x: Incorrect

element.innerHTML = 'example'
element.outerHTML = 'example'

:white_check_mark: Correct

element.setHTML('example', new Sanitizer())

see https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML

When Not To Use It

Attributes