Quick way to test binary websocket API behaviour.
Example outcome:
# Up
object [object ArrayBuffer], Key data: 38, String data: ☁
string , Key data: 38, String data: ☁
# Down
object [object ArrayBuffer], Key data: 40, String data: ⠁
string , Key data: 40, String data: ⠁
#Left
object [object ArrayBuffer], Key data: 37, String data: ━
string , Key data: 37, String data: ━
#Right
object [object ArrayBuffer], Key data: 39, String data: ✁
string , Key data: 39, String data: ✁
# Strg + c
object [object ArrayBuffer], Key data: 17, String data: ᄁ
object [object ArrayBuffer], Key data: 67, String data: 䌁
string , Key data: 67, String data: 䌁
string , Key data: 17, String data: ᄁ
Instead of the
String.fromCharCode.apply
function you may also use the new Encoding API.