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.
7 * @extends {WebInspector.DialogDelegate}
8 * @param {function(string)} callback
10 WebInspector.AddSourceMapURLDialog = function(callback)
12 WebInspector.DialogDelegate.call(this);
13 this.element.classList.add("go-to-line-dialog");
14 this.element.createChild("label").textContent = WebInspector.UIString("Source map URL: ");
16 this._input = this.element.createChild("input");
17 this._input.setAttribute("type", "text");
19 this._goButton = this.element.createChild("button");
20 this._goButton.textContent = WebInspector.UIString("Go");
21 this._goButton.addEventListener("click", this._onGoClick.bind(this), false);
23 this._callback = callback;
27 * @param {!Element} element
28 * @param {function(string)} callback
30 WebInspector.AddSourceMapURLDialog.show = function(element, callback)
32 WebInspector.Dialog.show(element, new WebInspector.AddSourceMapURLDialog(callback));
35 WebInspector.AddSourceMapURLDialog.prototype = {
38 WebInspector.setCurrentFocusElement(this._input);
42 _onGoClick: function()
45 WebInspector.Dialog.hide();
50 var value = this._input.value;
51 this._callback(value);
59 __proto__: WebInspector.DialogDelegate.prototype