Allows a poppy service to handle requests from a client
Notify the client of a change in the service origin
Clients only accept messages from the origin of the service loaded into the poppy. This method allows changing the origin before redirecting to a different service.
Close the service
Use this instead of window.close() to notify the client about the closing immediately (otherwise it will find out by polling to check the window status)
Low level interface allowing directly specifying the MessagePorts to use to perform the exchange
Side of the exchange
Form of the exchange
MessagePort to perform exchange over
MessagePort to send ["done"] status once exchange is complete
Listen for a client request
This asynchronously waits for a client request and returns a promise that resolves to either the request (if one is detected) or undefined (after a timeout period of by default 1 second, the timeout parameter can change this)
This method doesn't open the request and may be called any number of times, and from any number of different pages, until request.open() is called. After that, the exchange will be complete.
Optionally specify a timeout duration, the default if not is 1 second
Generated using TypeDoc