()
| 39 | _window = null |
| 40 | |
| 41 | componentDidMount() { |
| 42 | this._resizeObserver = (this._window !== null && this._window.ResizeObserver) |
| 43 | ? new this._window.ResizeObserver(this.measure) |
| 44 | : new ResizeObserver(this.measure); |
| 45 | if (this._node !== null) { |
| 46 | this._resizeObserver.observe(this._node) |
| 47 | |
| 48 | if (typeof this.props.onResize === 'function') { |
| 49 | this.props.onResize( |
| 50 | getContentRect(this._node, types || getTypes(this.props)) |
| 51 | ) |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | componentWillUnmount() { |
| 57 | if (this._window !== null) { |
nothing calls this directly
no test coverage detected