1

I'm using jpm to develop firefox addon
I want to use Websocket in the firefox addon.Not in the content scripts but in the index.js[Background]

But it is throwing

JPM [error]   Message: ReferenceError: WebSocket is not defined

Then I tried by using the thirdparty modules way

But for that it's throwing dependent module not present

 Module `x` is not found at resource

I have tried to install those x modules by npm install -x --save .
Still it's throwing the same error

Vikash Pandey
  • 5,407
  • 6
  • 41
  • 42
Madhan
  • 5,750
  • 4
  • 28
  • 61
  • Definitely dont use third party modules it wont work. Im not sure how to do it in webextensions yet, but you have to use a FrameWorker in non-webext. – Noitidart Sep 24 '15 at 12:16
  • @FastSnail has some experience with sockets and had a nice question it. I'm not too familiar with sockets but check this topic out: http://stackoverflow.com/questions/32556786/data-send-by-firefox-tcp-socket-send-cant-retrive-until-close-the-socket – Noitidart Sep 27 '15 at 19:44
  • @LcSalazar has another solution which is quite nice over here: http://stackoverflow.com/questions/28326301/tcpsocket-listen-on-firefox-addon?lq=1 – Noitidart Sep 27 '15 at 19:45

0 Answers0