13.2. Configuring the PDR proxy
Each page that wants to connect to the PDR must create an instance of the PerspectiveProxy class. The creator of this class has a 'channel' parameter that must be bound to an instance of either SharedWorkerChannel
or InternalChannel
- the latter only for Safari.
The page does so through calling configurePDRproxy
with a string argument that signals what kind of Channel should be created.
Note
|
Safari is the exception. The rest of this text is oriented to other browsers. The Safari case will be treated in its own paragraph at the end of this chapter. |
configurePDRproxy
creates both a Channel instance and a PerspectivesProxy instance (and provides the former as argument to the latter’s constructor). It also fulfills two promises: PDRproxy
and SharedWorkerChannelPromise
.