function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lochan karlelochan karle 

Using third party javascript in lightning as CSP does not allow it after spring'17 release.

I am trying to use, google captcha and google translate in lightning component. Though from spring'17 release we can not use third party javascripts in lightning even if we have added them to csp. We will have to add that script in static resource and call it in lightning component. As per google, script for these pages are dynamically generated and not suggested to be stored and used. Any workaround for making this work in lightning?
Maf_007Maf_007
Hi Lochan,

You can call a visualforce page as an iFrame in your lightning component and reference your JS files from there. I had faced a similar issue recently and this is how I had overcome it.

Maf