Window Socket

pipeline status License » Apache-2.0 Repository - GitLab Documentation Sergiu Gordienco email sergiu.gordienco@gmail.com

Window Socket Communication Protocol - ( WSCP ) » used for communication between windows from different origins in same browser. It allow Applications from different Windows, Tabs, Iframes to communicate as separate program without code injections.

It depends by Application Prototype library, for OpenSource you may use Application Prototype Light

API

Table of Contents

source

Type: function (): MessageEventSource


target

Type: function (): WindowProxy


isSameSource

Type: function (source): boolean

  • source MessageEventSource

isSameTarget

Type: function (target): boolean

  • target WindowProxy

message

Type: function (args): WindowSocket.Client


fire

Type: function (eventName, args): WindowSocket.Client

  • eventName string
  • args ...any

disconnect

Type: function ()


WindowSocket

Type: function (_window)

  • _window Window? specify other window to listen

stop

Type: function (): WindowSocket


start

Type: function (): WindowSocket


broadcast

Type: function (args): WindowSocket


fire

Type: function (args): WindowSocket


validateSource

Validate Message Event Source

Type: function (event): WindowSocket.Client


encoders

get current encoders

Type: function ()


encoders

update encoders

Type: function (encoders): WindowSocket

  • encoders Array<WindowSocket.Encoder>

clients

Type: function ()


WindowSocket.Client

Type: function (event)


origins

Type: function (origin): WindowSocket


origins

Type: function ()


client

Type: function (client)