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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js

Issue 2560553004: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
index 402627f659826be3fe8092dbed72c368f7226187..15762866023d2c61ba3608320c4d9389e58ab74a 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -194,7 +194,7 @@
this._sourcesView.addEventListener(Sources.SourcesView.Events.EditorClosed, this._editorClosed.bind(this));
this._button = new UI.ToolbarButton(Common.UIString('Pretty print'), 'largeicon-pretty-print');
- this._button.addEventListener(UI.ToolbarButton.Events.Click, this._toggleFormatScriptSource, this);
+ this._button.addEventListener('click', this._toggleFormatScriptSource, this);
this._updateButton(sourcesView.currentUISourceCode());
return this._button;
@@ -216,10 +216,7 @@
return uiSourceCode.contentType().hasScripts();
}
- /**
- * @param {!Common.Event} event
- */
- _toggleFormatScriptSource(event) {
+ _toggleFormatScriptSource() {
var uiSourceCode = this._sourcesView.currentUISourceCode();
if (this._isFormatableScript(uiSourceCode))
this._formatUISourceCodeScript(uiSourceCode);

Powered by Google App Engine
This is Rietveld 408576698