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
sourceMessageEventSource
isSameTarget
Type: function (target): boolean
targetWindowProxy
message
Type: function (args): WindowSocket.Client
args...Array<any>
fire
Type: function (eventName, args): WindowSocket.Client
eventNamestringargs...any
disconnect
Type: function ()
WindowSocket
Type: function (_window)
_windowWindow? 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
eventMessageEvent
encoders
get current encoders
Type: function ()
encoders
update encoders
Type: function (encoders): WindowSocket
encodersArray<WindowSocket.Encoder>
clients
Type: function ()
WindowSocket.Client
Type: function (event)
eventMessageEvent
origins
Type: function (origin): WindowSocket
originstring
origins
Type: function ()
client
Type: function (client)
clientWindowSocket.Client