Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
// Mount the provided source as the application into the content wrapper.
this.xfcFrame = Consumer.mount(this.embeddedContentWrapper, this.props.src, this.props.options);
// Notify that the consumer frame has mounted.
if (this.props.onMount) {
this.props.onMount(this.xfcFrame);
}
// Attach the event handlers to the xfc frame.
this.addEventListener('xfc.launched', this.props.onLaunch);
this.addEventListener('xfc.authorized', this.props.onAuthorize);
// Attach custom event handlers to the xfc frame.
this.addEventListeners(this.props.eventHandlers);
}