()
| 43 | } |
| 44 | |
| 45 | componentDidMount() { |
| 46 | this._isMounted = true; |
| 47 | |
| 48 | const doc = this.getDoc(); |
| 49 | |
| 50 | if (doc) { |
| 51 | this.nodeRef.current.contentWindow.addEventListener( |
| 52 | 'DOMContentLoaded', |
| 53 | this.handleLoad |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | if (this.props.dangerouslyUseDocWrite) { |
| 58 | this.handleLoad(); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | componentWillUnmount() { |
| 63 | this._isMounted = false; |