onConnect property

EventStream<Port> get onConnect

Fired when a connection is made from either an extension process or a content script (by runtime.connect).

Implementation

EventStream<Port> get onConnect =>
    $js.chrome.runtime.onConnect.asStream(($c) => ($js.Port port) {
          return $c(Port.fromJS(port));
        }.toJS);