| Index: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| index 375e45aab8096a6dc6ccd6d83181d90a197feb44..06160f5a513a7b3de38ae1ffb8a136039d0ed287 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| @@ -307,6 +307,7 @@ UI.TextPrompt = class extends Common.Object {
|
| this._queryRange.endColumn += text.length - this._previousText.length;
|
| this._refreshGhostText();
|
| this._previousText = text;
|
| + this.emit(new UI.TextPrompt.TextChangedEvent());
|
|
|
| this.autoCompleteSoon();
|
| }
|
| @@ -334,7 +335,7 @@ UI.TextPrompt = class extends Common.Object {
|
| this._refreshGhostText();
|
|
|
| if (beforeText !== this.textWithCurrentSuggestion())
|
| - this.dispatchEventToListeners(UI.TextPrompt.Events.ItemApplied);
|
| + this.emit(new UI.TextPrompt.TextChangedEvent());
|
| }
|
|
|
| _refreshGhostText() {
|
| @@ -508,7 +509,7 @@ UI.TextPrompt = class extends Common.Object {
|
| this._currentSuggestion = suggestion;
|
| this._refreshGhostText();
|
| if (isIntermediateSuggestion)
|
| - this.dispatchEventToListeners(UI.TextPrompt.Events.ItemApplied);
|
| + this.emit(new UI.TextPrompt.TextChangedEvent());
|
| }
|
|
|
| /**
|
| @@ -531,7 +532,7 @@ UI.TextPrompt = class extends Common.Object {
|
| this._queryRange.startColumn + this._currentSuggestion.length);
|
|
|
| this.clearAutocomplete();
|
| - this.dispatchEventToListeners(UI.TextPrompt.Events.ItemAccepted);
|
| + this.emit(new UI.TextPrompt.TextChangedEvent());
|
|
|
| return true;
|
| }
|
| @@ -638,8 +639,5 @@ UI.TextPrompt = class extends Common.Object {
|
|
|
| UI.TextPrompt.DefaultAutocompletionTimeout = 250;
|
|
|
| -/** @enum {symbol} */
|
| -UI.TextPrompt.Events = {
|
| - ItemApplied: Symbol('text-prompt-item-applied'),
|
| - ItemAccepted: Symbol('text-prompt-item-accepted')
|
| -};
|
| +/** @implements {Common.Emittable} */
|
| +UI.TextPrompt.TextChangedEvent = class {};
|
|
|