()
| 157 | } |
| 158 | |
| 159 | render() { |
| 160 | const props = { |
| 161 | ...this.props, |
| 162 | children: undefined // The iframe isn't ready so we drop children from props here. #12, #17 |
| 163 | }; |
| 164 | |
| 165 | if (!this.props.dangerouslyUseDocWrite) { |
| 166 | props.srcDoc = this.props.initialContent; |
| 167 | } |
| 168 | |
| 169 | delete props.head; |
| 170 | delete props.initialContent; |
| 171 | delete props.mountTarget; |
| 172 | delete props.dangerouslyUseDocWrite; |
| 173 | delete props.contentDidMount; |
| 174 | delete props.contentDidUpdate; |
| 175 | delete props.forwardedRef; |
| 176 | |
| 177 | return ( |
| 178 | <iframe {...props} ref={this.setRef} onLoad={this.handleLoad}> |
| 179 | {this.state.iframeLoaded && this.renderFrameContents()} |
| 180 | </iframe> |
| 181 | ); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | export default React.forwardRef((props, ref) => ( |
no test coverage detected