-
Eduardo Sanz García authored
There are two methods to get the host port from `PortProvider`: - `#hostPortFrom` which returns the host port exclusively from the `sidebar-host` channel. - `#on` allows to register a listener that is fired upon requests of host frames for channels other than the `sidebar-host`. This is an attempt to simplify the API of `PortProvider` and merge both methods into one. Advantages: - simplifies the `Sidebar` constructor signature (no need to pass the host port) - avoids the pitfall of creating host-sidebar RPC channel before registering the RPC methods - prepares for future guest-host channel see https://github.com/hypothesis/client/blob/ad93317debdac0d2c3abec83eb9d690934632ef3/src/annotator/index.js#L64-L66 (where the `#on` method is use to create the guest-host channel).
f364519b
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
annotator | ||
boot | ||
images/icons | ||
shared | ||
sidebar | ||
styles | ||
test-util | ||
types | ||
.eslintrc | ||
karma.config.js | ||
tsconfig.json |