()
| 8 | import {initFactory, verifyConnectPermission, createController as createControllerInstance, getControllerClass} from './factory'; |
| 9 | |
| 10 | export function initController() { |
| 11 | initFactory(); |
| 12 | chrome.runtime.onConnect.addListener(port => { |
| 13 | // create controllers for incoming connections by name and id |
| 14 | addPort(port); |
| 15 | // update active ports on disconnect |
| 16 | port.onDisconnect.addListener(removePort); |
| 17 | }); |
| 18 | } |
| 19 | |
| 20 | class EventCache { |
| 21 | constructor(port, addPortSequence) { |
no test coverage detected