0

I'm simply trying to use the lwc:inner-html example provided in the link below and can't get around the compile error:

LWC1534: lwc:inner-html attribute is not supported.

https://lwc.dev/guide/html_templates#inject-raw-html-content

I can't find this lwc:inner-hmtl directive in the official SF LWC docs, maybe its not officially supported? I'm supposed to use lwc:dom="manual"?

https://developer.salesforce.com/docs/platform/lwc/guide/reference-directives.html

https://developer.salesforce.com/docs/platform/lwc/guide/reference-directives.html#lwccolondommanual

1 Answer 1

0

LWR (from lwc.dev) is not the same as LWC in Salesforce. If you're developing in Salesforce, use the LWC documentation, and if you're building a standalone app (e.g. for Heroku), use the lwc.dev guide. In this case, you should use lwc:dom="manual" if you want to control the DOM inside a node. Note that sanitation still occurs when you use this directive, so it's not possible to inject scripts and other unsafe content.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .