Skip to content

Commit d040904

Browse files
committed
Bug 1980572 - [devtools] Turn InspectorPanel into a proper ES class. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D259522
1 parent 9f11b40 commit d040904

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

devtools/client/inspector/panel.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
"use strict";
66

7-
function InspectorPanel(iframeWindow, toolbox, commands) {
8-
this._inspector = new iframeWindow.Inspector(toolbox, commands);
9-
}
10-
InspectorPanel.prototype = {
7+
class InspectorPanel {
8+
constructor(iframeWindow, toolbox, commands) {
9+
this._inspector = new iframeWindow.Inspector(toolbox, commands);
10+
}
1111
/**
1212
* Initialize the inspector
1313
*
@@ -16,10 +16,10 @@ InspectorPanel.prototype = {
1616
*/
1717
open(options = {}) {
1818
return this._inspector.init(options);
19-
},
19+
}
2020

2121
destroy() {
2222
this._inspector.destroy();
23-
},
24-
};
23+
}
24+
}
2525
exports.InspectorPanel = InspectorPanel;

0 commit comments

Comments
 (0)