Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: Source/devtools/front_end/platform/utilities.js

Issue 1268353005: [DevTools] Support JQuery event listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 * @param {T} defaultValue 1492 * @param {T} defaultValue
1493 * @return {!Promise.<T>} 1493 * @return {!Promise.<T>}
1494 * @template T 1494 * @template T
1495 */ 1495 */
1496 Promise.prototype.catchException = function(defaultValue) { 1496 Promise.prototype.catchException = function(defaultValue) {
1497 return this.catch(function (error) { 1497 return this.catch(function (error) {
1498 console.error(error); 1498 console.error(error);
1499 return defaultValue; 1499 return defaultValue;
1500 }); 1500 });
1501 } 1501 }
1502
1503 /**
1504 * @param {!Object} object
1505 * @param {*} propertyName
1506 * @param {T} result
1507 * @return {T}
1508 * @template T
1509 */
1510 function storeResultTo(object, propertyName, result)
1511 {
1512 object[propertyName] = result;
1513 return result;
1514 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/EventListenersWidget.js ('k') | Source/devtools/front_end/sdk/RemoteObject.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698