I'm getting the following error in the process of updating one of our remaining components to API version 40.0:
Uncaught SecurityError: Blocked a frame with origin "https://myorg.visual.force.com" from accessing a cross-origin frame. throws at https://myorg.visual.force.com/auraFW/javascript/xyz
I've tried everything I've come across, but I'm having no luck. CORS whitelisting, Firefox, Chrome, Edge. Not a single solution has worked to date.
<script>
<!--params here -->
$Lightning.use("c:MyApp", function() {
$Lightning.createComponent("c:MyCmp",
{ params: '',
label : "" },
"lightning",
function(cmp) {
});
});
</script>
We have a VF page above which creates our lightning component, which is linked up to and 'communicates' with our external JS library:
<aura:component controller="My_Ctrl" >
<ltng:require styles="/assets/stylesheets/ui.css"
scripts="/resource/JQuery224,/assets/javascripts/ui.js"
afterScriptsLoaded="{!c.doInit}" />
<aura:attribute name="myExternalLib" type="String"default="namespace_ExternalLib" />
<!-- Attributes here -->
<div style="height:100%;">
<div aura:id="filterWrapper"></div>
<br/>
<div aura:id="tabsWrapper"></div>
<br/>
<div style="height:70%;">
<div aura:id="journalItemsSpinner" class="spinner--small slds-hide" style="width:32px; height: 32px; position: fixed; top: 50%; left: 50%; z-index: 8000;">
<img src="/assets/images/spinners/spinner.gif" alt="Loading..." />
</div>
<div class="-wrap" style="height:100%">
<div style="height:100%;" class="my-class" >
<div aura:id="cardListWrapper" style="height:100%;"></div>
<div aura:id="pagination"></div>
</div>
<div style="height:100%;" class="slds-large-size--1-of-5" >
<div aura:id="id1" style="height:100%;"> </div>
</div>
</div>
</div>
</div>
</aura:component>
I'm at a complete loss after an already long week. Does anyone have any ideas where I should be looking? Any help much appreciated.
<apex:includeScript value="{!URLFOR($Resource.LibraryJS, '/base/subdir/file.js')}"/>
If so, yes, tried and tested!