| 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 b465eb2d046a9c0b08290bebb3e0b603d9a68d70..b054ed04f161084b31bf423fbf6a8d7a7e7a1cdc 100644
|
| --- a/Source/devtools/front_end/sdk/RemoteObject.js
|
| +++ b/Source/devtools/front_end/sdk/RemoteObject.js
|
| @@ -133,6 +133,24 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {function(this:Node)} listenersGetter
|
| + * @return {!Promise<?Array<!WebInspector.EventListener>>}
|
| + */
|
| + frameworkEventListeners: function(listenersGetter)
|
| + {
|
| + throw "Not implemented";
|
| + },
|
| +
|
| + /**
|
| + * @param {function(this:Node)} handlersGetter
|
| + * @return {!Promise<?Array<function()>>}
|
| + */
|
| + frameworkInternalEventHandlers: function(handlersGetter)
|
| + {
|
| + throw "Not implemented";
|
| + },
|
| +
|
| + /**
|
| * @param {!RuntimeAgent.CallArgument} name
|
| * @param {function(string=)} callback
|
| */
|
| @@ -194,6 +212,25 @@ WebInspector.RemoteObject.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {function(this:Object, ...)} functionDeclaration
|
| + * @param {!Array.<!RuntimeAgent.CallArgument>|undefined} args
|
| + * @return {!Promise<*>}
|
| + */
|
| + callFunctionJSONPromise: function(functionDeclaration, args)
|
| + {
|
| + return new Promise(promiseConstructor.bind(this));
|
| +
|
| + /**
|
| + * @param {function(*)} success
|
| + * @this {WebInspector.RemoteObject}
|
| + */
|
| + function promiseConstructor(success)
|
| + {
|
| + this.callFunctionJSON(functionDeclaration, args, success);
|
| + }
|
| + },
|
| +
|
| + /**
|
| * @return {!WebInspector.Target}
|
| */
|
| target: function()
|
| @@ -489,12 +526,32 @@ WebInspector.RemoteObjectImpl.prototype = {
|
| */
|
| function createEventListener(payload)
|
| {
|
| - return new WebInspector.EventListener(this._debuggerModel, payload, this._objectId);
|
| + return WebInspector.EventListener.fromPayload(this._debuggerModel, payload);
|
| }
|
| }
|
| },
|
|
|
| /**
|
| + * @override
|
| + * @param {function(this:Object)} listenersGetter
|
| + * @return {!Promise<?Array<!WebInspector.EventListener>>}
|
| + */
|
| + frameworkEventListeners: function(listenersGetter)
|
| + {
|
| + return this.callFunctionPromise(listenersGetter, undefined).then(WebInspector.castEventListeners);
|
| + },
|
| +
|
| + /**
|
| + * @override
|
| + * @param {function(this:Object)} handlersGetter
|
| + * @return {!Promise<?Array<function()>>}
|
| + */
|
| + frameworkInternalEventHandlers: function(handlersGetter)
|
| + {
|
| + return this.callFunctionPromise(handlersGetter, undefined).then(WebInspector.castEventHandlers);
|
| + },
|
| +
|
| + /**
|
| * @param {!Array.<string>} propertyPath
|
| * @param {function(?WebInspector.RemoteObject, boolean=)} callback
|
| */
|
|
|