| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 eventListeners: function() | 525 eventListeners: function() |
| 526 { | 526 { |
| 527 return new Promise(eventListeners.bind(this)); | 527 return new Promise(eventListeners.bind(this)); |
| 528 /** | 528 /** |
| 529 * @param {function(?)} fulfill | 529 * @param {function(?)} fulfill |
| 530 * @param {function(*)} reject | 530 * @param {function(*)} reject |
| 531 * @this {WebInspector.RemoteObject} | 531 * @this {WebInspector.RemoteObject} |
| 532 */ | 532 */ |
| 533 function eventListeners(fulfill, reject) | 533 function eventListeners(fulfill, reject) |
| 534 { | 534 { |
| 535 if (!this.target().isPage()) { | 535 if (!this.target().hasBrowserCapability()) { |
| 536 // TODO(kozyatinskiy): figure out how this should work for |wind
ow| when there is no DOMDebugger. | 536 // TODO(kozyatinskiy): figure out how this should work for |wind
ow| when there is no DOMDebugger. |
| 537 fulfill([]); | 537 fulfill([]); |
| 538 return; | 538 return; |
| 539 } | 539 } |
| 540 | 540 |
| 541 if (!this._objectId) { | 541 if (!this._objectId) { |
| 542 reject(null); | 542 reject(null); |
| 543 return; | 543 return; |
| 544 } | 544 } |
| 545 | 545 |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 }, | 1543 }, |
| 1544 | 1544 |
| 1545 /** | 1545 /** |
| 1546 * @return {!WebInspector.RemoteObject} | 1546 * @return {!WebInspector.RemoteObject} |
| 1547 */ | 1547 */ |
| 1548 object: function() | 1548 object: function() |
| 1549 { | 1549 { |
| 1550 return this._object; | 1550 return this._object; |
| 1551 } | 1551 } |
| 1552 } | 1552 } |
| OLD | NEW |