API Reference > imodeljs-frontend > IModelConnection > IModelConnection > onClose onClose Readonly onClose: BeEvent<(_imodel: IModelConnection) => void> = ... Event called immediately before this IModelConnection is closed. note This event is called only for this IModelConnection. To monitor all IModelConnections,use the static event. note Be careful not to perform any asynchronous operations on the IModelConnection because it will close before they are processed. Defined in core/frontend/src/IModelConnection.ts Line 158 onClose StaticReadonly onClose: BeEvent<(_imodel: IModelConnection) => void> = ... Event called immediately before any IModelConnection is closed. note This static event is called when any IModelConnection is closed, and the specific IModelConnection is passed as its argument. To monitor closing a specific IModelConnection, use the onClose instance event. note Be careful not to perform any asynchronous operations on the IModelConnection because it will close before they are processed. Defined in core/frontend/src/IModelConnection.ts Line 148 Last Updated: 29 November, 2022