Open firefox addon web browser connection

Is it possible for the firefox addon to connect to websites?

When I try:

var wsUri = "ws://echo.websocket.org/"; var ws = gBrowser.contentWindow.window.WebSocket || gBrowser.contentWindow.window.MozWebSocket; var websocket = new ws(wsUri); 

In the error console, the message reports

Error: Firefox cannot establish a connection to the server at ws: //echo.websocket.org/.

+4
source share
1 answer

Currently, it seems like the only way to proxy your messages to WebSocket is through PageWorker . The following is an example of how to do this on this website:

http://austinhartzheim.me/blog/4/websockets-firefox-sdk-addons/

+1
source

All Articles