A cross-site scripting attack can occur when an attribute value is interpolated into an HTML string and assigned to innerHTML. Prefer textContent when inserting user-controlled text; innerHTML is acceptable only for trusted HTML. section 3.1.2
Unsafe versus safer rendering
A component reading name from <hello-world name="Mark"> can render safely with textContent. Replacing that DOM construction with this.innerHTML = `<p>Hello, ${name}!</p>` allows an XSS attack if name contains hostile markup. section 3.1.2





