The WebSocket.binaryType property returns the type of binary data being transmitted by the connection.


var binaryType = aWebSocket.binaryType;


A DOMString:

If Blob objects are used.
If ArrayBuffer objects are used.



Specification Status Comment
HTML Living Standard
The definition of 'WebSocket: binaryType' in that specification.
Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
binaryTypeChrome Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes


Full support  
Full support
Compatibility unknown  
Compatibility unknown