• Eduardo Sanz García's avatar
    Remove `PortProvider#hostPortFrom` method · f364519b
    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
..
integration Loading commit data...
adder-test.js Loading commit data...
annotation-counts-test.js Loading commit data...
annotation-sync-test.js Loading commit data...
bucket-bar-test.js Loading commit data...
empty.html Loading commit data...
features-test.js Loading commit data...
frame-observer-test.js Loading commit data...
guest-test.js Loading commit data...
highlighter-test.js Loading commit data...
notebook-test.js Loading commit data...
range-util-test.js Loading commit data...
selection-observer-test.js Loading commit data...
sidebar-test.js Loading commit data...
sidebar-trigger-test.js Loading commit data...
toolbar-test.js Loading commit data...