2016-11-02 19:18:16 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-11-02 19:18:16 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-11-02 19:18:16 +00:00
|
|
|
*
|
2018-05-11 02:06:46 +00:00
|
|
|
* @format
|
2016-11-02 19:18:16 +00:00
|
|
|
* @flow
|
|
|
|
*/
|
2018-05-11 02:06:46 +00:00
|
|
|
|
2016-11-02 19:18:16 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
export type EventSender = (name: string, params: Object) => void;
|
|
|
|
|
|
|
|
class InspectorAgent {
|
|
|
|
_eventSender: EventSender;
|
|
|
|
|
|
|
|
constructor(eventSender: EventSender) {
|
|
|
|
this._eventSender = eventSender;
|
|
|
|
}
|
|
|
|
|
|
|
|
sendEvent(name: string, params: Object) {
|
|
|
|
this._eventSender(name, params);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = InspectorAgent;
|