File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export class Frame extends Component {
1111  // element that we render react into. 
1212  static  propTypes  =  { 
1313    style : PropTypes . object ,  // eslint-disable-line 
14+     onLoad : PropTypes . func , 
1415    head : PropTypes . node , 
1516    initialContent : PropTypes . string , 
1617    mountTarget : PropTypes . string , 
@@ -24,6 +25,7 @@ export class Frame extends Component {
2425
2526  static  defaultProps  =  { 
2627    style : { } , 
28+     onLoad : undefined , 
2729    head : null , 
2830    children : undefined , 
2931    mountTarget : undefined , 
@@ -82,6 +84,9 @@ export class Frame extends Component {
8284
8385  handleLoad  =  ( )  =>  { 
8486    this . setState ( {  iframeLoaded : true  } ) ; 
87+     if  ( this . props . onLoad )  { 
88+       this . props . onLoad ( ) ; 
89+     } 
8590  } ; 
8691
8792  renderFrameContents ( )  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments