OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 this._proxyElement; | 42 this._proxyElement; |
43 this._proxyElementDisplay = "inline-block"; | 43 this._proxyElementDisplay = "inline-block"; |
44 this._loadCompletions = completions; | 44 this._loadCompletions = completions; |
45 this._completionStopCharacters = stopCharacters || " =:[({;,!+-*/&|^<>."; | 45 this._completionStopCharacters = stopCharacters || " =:[({;,!+-*/&|^<>."; |
46 this._autocompletionTimeout = WebInspector.TextPrompt.DefaultAutocompletionT
imeout; | 46 this._autocompletionTimeout = WebInspector.TextPrompt.DefaultAutocompletionT
imeout; |
47 this._title = ""; | 47 this._title = ""; |
48 } | 48 } |
49 | 49 |
50 WebInspector.TextPrompt.DefaultAutocompletionTimeout = 250; | 50 WebInspector.TextPrompt.DefaultAutocompletionTimeout = 250; |
51 | 51 |
| 52 /** @enum {symbol} */ |
52 WebInspector.TextPrompt.Events = { | 53 WebInspector.TextPrompt.Events = { |
53 ItemApplied: "text-prompt-item-applied", | 54 ItemApplied: Symbol("text-prompt-item-applied"), |
54 ItemAccepted: "text-prompt-item-accepted" | 55 ItemAccepted: Symbol("text-prompt-item-accepted") |
55 }; | 56 }; |
56 | 57 |
57 WebInspector.TextPrompt.prototype = { | 58 WebInspector.TextPrompt.prototype = { |
58 /** | 59 /** |
59 * @param {number} timeout | 60 * @param {number} timeout |
60 */ | 61 */ |
61 setAutocompletionTimeout: function(timeout) | 62 setAutocompletionTimeout: function(timeout) |
62 { | 63 { |
63 this._autocompletionTimeout = timeout; | 64 this._autocompletionTimeout = timeout; |
64 }, | 65 }, |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 }, | 1030 }, |
1030 | 1031 |
1031 /** | 1032 /** |
1032 * @return {string|undefined} | 1033 * @return {string|undefined} |
1033 */ | 1034 */ |
1034 _currentHistoryItem: function() | 1035 _currentHistoryItem: function() |
1035 { | 1036 { |
1036 return this._data[this._data.length - this._historyOffset]; | 1037 return this._data[this._data.length - this._historyOffset]; |
1037 } | 1038 } |
1038 }; | 1039 }; |
OLD | NEW |