How to use the xfc.Consumer.mount function in xfc

To help you get started, we’ve selected a few xfc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerner / terra-core / packages / terra-embedded-content-consumer / src / EmbeddedContentConsumer.jsx View on Github external
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);
  }

xfc

A Cross Frame Container that handles securely embedding web content into a 3rd party domain

Apache-2.0
Latest version published 5 months ago

Package Health Score

71 / 100
Full package analysis