Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

[lint] set-unknown-attribute for innerHTML #298

Closed benjaminrancourt closed 2 years ago

benjaminrancourt commented 6 years ago

Hi,

Is it normal that the polymer-linter warns us if we use the innerHTML property on a custom element? We need to use this property as the received data contains some HTML.

<udes-notice id="notice" inner-h-t-m-l="[[data]]"></udes-notice>

warning [set-unknown-attribute] - udes-notice elements do not have a property named innerHTML. Consider instead:  innerText

If we set the same property on a simple div, polymer-linter does not warn us:

<udes-notice id="notice"><div inner-h-t-m-l="[[data]]"></div></udes-notice>

Or, should we set the HTML data by JavaScript to get rid of this warning?

this.$.notice.innerHTML = data;

Thanks!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!