Lightning events between Lightning Components and Skuid pages

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Has anyone done anything with broadcasting events between Lightning Components and a Skuid page embedded together in a Lightning App? For example:

<aura:application>
  <c:myComponent/>
  <skuid:page name="MySkuidPage"/>
</aura:application>

Two questions really:
1. Is it possible for myComponent to emit events that can be received in MySkuidPage?
2. And can MySkuidPage emit events that can be received in myComponent?

This page suggests it should be possible, though having used the code (with some slight modifications to call my own event) in an app similar to the above, there's an error "Uncaught SecurityError: Blocked a frame with origin "https://{mydomainhere}.lightning.force.com"; from accessing a cross-origin frame." I think this may be the LockerService restrictions. I've tried rolling back the API versions of the components to v35, but I get the same error message.

Has anyone experimented with this or have thoughts on if it is possible? 
Photo of Gary

Gary

  • 1,518 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,014 Points 20k badge 2x thumb
Official Response
Gary, in Skuid's Millau release, we added an extensive set of capabilities around use of Lightning Events with Skuid.

You can now use Events to perform all of the following directions of communication:

Skuid Page Lightning Component <--> Skuid Page Lightning Component
Skuid Page Lightning Component <--> Custom code Lightning Component

See the Millau release documentation on using Events to facilitate inter-component communication with Skuid:

https://docs.skuid.com/v11.0.0/en/skuid/salesforce/event-handling-lightning.html