I think I'd be more comfortable with `readyState !== "open"` in case additional states are added in future.