| Index: Source/devtools/front_end/sdk/RemoteObject.js
|
| diff --git a/Source/devtools/front_end/sdk/RemoteObject.js b/Source/devtools/front_end/sdk/RemoteObject.js
|
| index f7e7a69697aba5e38eb7af8fa7ea748ba9058f57..4ed59d0d78f46a41958165fdf8303b023eb56b55 100644
|
| --- a/Source/devtools/front_end/sdk/RemoteObject.js
|
| +++ b/Source/devtools/front_end/sdk/RemoteObject.js
|
| @@ -95,6 +95,15 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {string} objectGroupName
|
| + * @param {function(?Array<!WebInspector.RuntimeModel.ObjectEventListener>)} callback
|
| + */
|
| + getEventListeners: function(objectGroupName, callback)
|
| + {
|
| + throw "Not implemented";
|
| + },
|
| +
|
| + /**
|
| * @param {!RuntimeAgent.CallArgument} name
|
| * @param {function(string=)} callback
|
| */
|
| @@ -374,6 +383,42 @@ WebInspector.RemoteObjectImpl.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| + * @param {string} objectGroupName
|
| + * @param {function(?Array<!WebInspector.RuntimeModel.ObjectEventListener>)} callback
|
| + */
|
| + getEventListeners: function(objectGroupName, callback)
|
| + {
|
| + if (!this._objectId) {
|
| + callback(null);
|
| + return;
|
| + }
|
| + var description = this.description;
|
| + /**
|
| + * @this {!WebInspector.RemoteObject}
|
| + * @param {?Protocol.Error} error
|
| + * @param {!Array.<!RuntimeAgent.EventListener>} payloads
|
| + */
|
| + function mycallback(error, payloads)
|
| + {
|
| + if (error) {
|
| + callback(null);
|
| + return;
|
| + }
|
| + callback(payloads.map(createEventListener.bind(this)));
|
| + }
|
| + /**
|
| + * @this {!WebInspector.RemoteObject}
|
| + * @param {!RuntimeAgent.EventListener} payload
|
| + */
|
| + function createEventListener(payload)
|
| + {
|
| + return new WebInspector.RuntimeModel.ObjectEventListener(this._target, payload, this.description || "Object");
|
| + }
|
| + this._runtimeAgent.getEventListeners(this._objectId, objectGroupName, mycallback.bind(this));
|
| + },
|
| +
|
| + /**
|
| * @param {!Array.<string>} propertyPath
|
| * @param {function(?WebInspector.RemoteObject, boolean=)} callback
|
| */
|
|
|