liriliri / eruda

Console for mobile browsers
https://eruda.liriliri.io
MIT License
18.19k stars 1.17k forks source link

Intercept web-sockets? #125

Open cswl opened 4 years ago

cswl commented 4 years ago

Many mobile website use WebSockets .

Could a plugin / feature be made to intercept / view thosee?

KaKi87 commented 2 years ago

Hello, any news on this ? Thanks

iocmet commented 2 years ago

I think you can overwrite websocket class and send function in it

iocmet commented 2 years ago

const orig_send = WebSocket.send; WebSocket.send = function (data) { console.log(data); const r = orig_send.apply(orig_send, [data]); return r; }