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); |