Comment above is incorrect. Instead you should call `this.lifecycleView.close()` in the `beforeClose` function.