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

Side by Side Diff: Source/devtools/front_end/sources/AddSourceMapURLDialog.js

Issue 373743003: DevTools: Add support for adding source map to a script from the DevTools window. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @constructor
7 * @extends {WebInspector.DialogDelegate}
8 * @param {function(string)} callback
9 */
10 WebInspector.AddSourceMapURLDialog = function(callback)
11 {
12 WebInspector.DialogDelegate.call(this);
13
14 this.element = document.createElementWithClass("div", "go-to-line-dialog");
15 this.element.createChild("label").textContent = WebInspector.UIString("Sourc e map URL: ");
16
17 this._input = this.element.createChild("input");
18 this._input.setAttribute("type", "text");
19
20 this._callback = callback;
21 }
22
23 /**
24 * @param {!Element} element
25 * @param {function(string)} callback
26 */
27 WebInspector.AddSourceMapURLDialog.show = function(element, callback)
28 {
29 WebInspector.Dialog.show(element, new WebInspector.AddSourceMapURLDialog(cal lback));
30 }
31
32 WebInspector.AddSourceMapURLDialog.prototype = {
33 focus: function()
34 {
35 WebInspector.setCurrentFocusElement(this._input);
36 this._input.select();
37 },
38
39 onEnter: function()
40 {
41 var value = this._input.value;
42 this._callback(value);
43 },
44
45 __proto__: WebInspector.DialogDelegate.prototype
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698