Window Socket
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
- target
- isSameSource
- isSameTarget
- message
- fire
- disconnect
- WindowSocket
- WindowSocket.Client
- origins
- origins
- client
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
args
...Array<any>
fire
Type: function (eventName, args): WindowSocket.Client
eventName
stringargs
...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
args
...Array<any>
fire
Type: function (args): WindowSocket
args
...Array<any>
validateSource
Validate Message Event Source
Type: function (event): WindowSocket.Client
event
MessageEvent
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)
event
MessageEvent
origins
Type: function (origin): WindowSocket
origin
string
origins
Type: function ()
client
Type: function (client)
client
WindowSocket.Client