| Index: Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
|
| diff --git a/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js b/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
|
| index bdc30fc1ef485db7cdc82991ea7a48eb71b80851..30383c563e6187ff4e8a3727a5c442f01763efe9 100644
|
| --- a/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
|
| +++ b/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
|
| @@ -11,11 +11,11 @@ WebInspector.ObjectEventListenersSidebarPane = function()
|
| WebInspector.SidebarPane.call(this, "Event Listeners");
|
| this.element.classList.add("event-listeners-sidebar-pane");
|
|
|
| - var refreshButton = new WebInspector.ToolbarButton(WebInspector.UIString("Refresh"), "refresh-toolbar-item");
|
| - refreshButton.addEventListener("click", this._refreshClick.bind(this));
|
| - this.toolbar().appendToolbarItem(refreshButton);
|
| + this._refreshButton = new WebInspector.ToolbarButton(WebInspector.UIString("Refresh"), "refresh-toolbar-item");
|
| + this._refreshButton.addEventListener("click", this._refreshClick.bind(this));
|
| + this._refreshButton.setEnabled(false);
|
| + this.toolbar().appendToolbarItem(this._refreshButton);
|
|
|
| - WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext, this.update, this);
|
| this._eventListenersView = new WebInspector.EventListenersView(this.element);
|
| }
|
|
|
| @@ -38,12 +38,21 @@ WebInspector.ObjectEventListenersSidebarPane.prototype = {
|
| Promise.all([this._windowObjectInContext(executionContext)]).then(this._eventListenersView.addObjects.bind(this._eventListenersView));
|
| },
|
|
|
| - expand: function()
|
| + wasShown: function()
|
| {
|
| - WebInspector.SidebarPane.prototype.expand.call(this);
|
| + WebInspector.SidebarPane.prototype.wasShown.call(this);
|
| + WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext, this.update, this);
|
| + this._refreshButton.setEnabled(true);
|
| this.update();
|
| },
|
|
|
| + willHide: function()
|
| + {
|
| + WebInspector.SidebarPane.prototype.willHide.call(this);
|
| + WebInspector.context.removeFlavorChangeListener(WebInspector.ExecutionContext, this.update, this);
|
| + this._refreshButton.setEnabled(false);
|
| + },
|
| +
|
| /**
|
| * @param {!WebInspector.ExecutionContext} executionContext
|
| * @return {!Promise<!WebInspector.RemoteObject>} object
|
|
|