| OLD | NEW |
| (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 } |
| OLD | NEW |