EventedIFrame extends React.Component

Summary

EventedIFrame is a thin wrapper around the DOM's standard <iframe> element. You should always use EventedIFrame, because it provides important event hooks that ensure keyboard and mouse events are properly delivered to the application when fired within iFrames.

<div className="file-frame-container">
  <EventedIFrame src={src} />
  <Spinner visible={!@state.ready} />
</div>

Any props added to the are passed to the iFrame it renders.

Instance Methods

documentWasReplaced()

Call this method if you replace the contents of the iframe's document. This allows EventedIframe to re-attach it's event listeners.