function eventListeners(fulfill, reject)
        {
            if (!this.target().isPage()) {
                // TODO(kozyatinskiy): figure out how this should work for |window| when there is no DOMDebugger.
                fulfill([]);
                return;
            }

            if (!this._objectId) {
                reject(null);
                return;
            }

            /** @type {?WebInspector.RemoteObject} */
            var removeFunction = null;

            this.callFunctionPromise(nodeRemoveEventListener).then(storeRemoveFunction.bind(this));

            /**
             * @param {!WebInspector.CallFunctionResult} result
             * @this {WebInspector.RemoteObject}
             */
            function storeRemoveFunction(result)
            {
                if (!result.wasThrown && result.object)
                    removeFunction = result.object;
                this.target().domdebuggerAgent().getEventListeners(this._objectId, mycallback.bind(this));
            }

            /**
             * @this {!WebInspector.RemoteObject}
             * @param {?Protocol.Error} error
             * @param {!Array<!DOMDebuggerAgent.EventListener>} payloads
             */
            function mycallback(error, payloads)
            {
                if (error) {
                    reject(null);
                    return;
                }
                fulfill(payloads.map(createEventListener.bind(this)));
            }

            /**
             * @suppressReceiverCheck
             * @this {Node}
             * @return {function(this:Node, string, function(), boolean=): undefined}
             */
            function nodeRemoveEventListener()
            {
                return removeEventListenerWrapper.bind(this);
                /**
                 * @param {string} type
                 * @param {function()} handler
                 * @param {boolean=} useCapture
                 * @this {Node}
                 */
                function removeEventListenerWrapper(type, handler, useCapture)
                {
                    this.removeEventListener(type, handler, useCapture);
                    if (this["on" + type])
                        this["on" + type] = null;
                }
            }

            /**
             * @this {!WebInspector.RemoteObject}
             * @param {!DOMDebuggerAgent.EventListener} payload
             */
            function createEventListener(payload)
            {
                return new WebInspector.EventListener(this._target,
                                                      payload.type,
                                                      payload.useCapture,
                                                      payload.handler ? this.target().runtimeModel.createRemoteObject(payload.handler) : null,
                                                      payload.originalHandler ? this.target().runtimeModel.createRemoteObject(payload.originalHandler) : null,
                                                      WebInspector.DebuggerModel.Location.fromPayload(this._debuggerModel, payload.location),
                                                      removeFunction);
            }
        }
@param {function(?)} fulfill
@param {function(*)} reject
@this {WebInspector.RemoteObject}