We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19addf4 commit 761fa5cCopy full SHA for 761fa5c
1 file changed
src/Frame.jsx
@@ -11,6 +11,7 @@ export class Frame extends Component {
11
// element that we render react into.
12
static propTypes = {
13
style: PropTypes.object, // eslint-disable-line
14
+ onLoad: PropTypes.func,
15
head: PropTypes.node,
16
initialContent: PropTypes.string,
17
mountTarget: PropTypes.string,
@@ -24,6 +25,7 @@ export class Frame extends Component {
24
25
26
static defaultProps = {
27
style: {},
28
+ onLoad: undefined,
29
head: null,
30
children: undefined,
31
mountTarget: undefined,
@@ -82,6 +84,9 @@ export class Frame extends Component {
82
84
83
85
handleLoad = () => {
86
this.setState({ iframeLoaded: true });
87
+ if (this.props.onLoad) {
88
+ this.props.onLoad();
89
+ }
90
};
91
92
renderFrameContents() {
0 commit comments