wasClean

Returns true if the connection closed cleanly; false otherwise.

MDN Reference