WebSocket: remove unused `self` variable
WebSocket: use `Array.isArray()`

A little bit cleaner code this way.
WebSocket: fix whitespace
WebSocket: avoid defining the `self` variable twice