Chromium Code Reviews| Index: Source/devtools/front_end/sdk/Target.js |
| diff --git a/Source/devtools/front_end/sdk/Target.js b/Source/devtools/front_end/sdk/Target.js |
| index 8f2f77ed6cfa324359474338785039e45b2560a8..4ae0d4e4b5d5cad4b92c48afba7850cf0a0e5fed 100644 |
| --- a/Source/devtools/front_end/sdk/Target.js |
| +++ b/Source/devtools/front_end/sdk/Target.js |
| @@ -567,6 +567,20 @@ WebInspector.TargetManager.prototype = { |
| }, |
| /** |
| + * |
| + * @param {number} id |
| + * @return {?WebInspector.Target} |
| + */ |
| + targetById: function(id) |
| + { |
| + for (var target of this._targets) { |
|
pfeldman
2015/05/26 13:03:33
Since it is likely to be called for every uiSource
sergeyv
2015/05/26 13:53:17
Done.
|
| + if (target.id() === id) |
| + return target; |
| + } |
| + return null; |
| + }, |
| + |
| + /** |
| * @return {?WebInspector.Target} |
| */ |
| mainTarget: function() |