0

I am trying use to the object tag in LWC like this

<template>
  <object   data="https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf"
    type="pdf"
  ></object>
</template>

Chrome Dev Console is displaying this:

Refused to load plugin data from 'https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf' because it violates the following Content Security Policy directive: "object-src 'self' https://nosoftware-ability-5363-dev-ed--c.documentforce.com".

I've enable CSP for the domain - but now wondering if Salesforce doesn't support the object-src directive.

Any one successfully used tag in LWC?

thanks

2

The LWC framework doesn't support many HTML tags, Object is one of them. Refer to this link to get the complete list.

You can also directly refer this github repo given in the above link. Any tag followed by (false) is not supported. For example, applet(false) means the applet tag isn't supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.