Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

The endpoint is specified at this line:

Code Block
const ws = new WebSocket(((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.host + "${request.contextPath}/web/socket/plugin/org.joget.WebSocketPlugin");

You may change the endpoint accordingly.

The following 4 functions are event handlers that handles different WebSocket Events :

ws.onopen = function(event)

ws.onmessage = function(event)

ws.onclose = function(event)

ws.onError = function(event)

...