Skip to content

Commit 471b9ac

Browse files
committed
JSDocs go above a function not below
1 parent fe4be16 commit 471b9ac

File tree

1 file changed

+13
-13
lines changed
  • debug_toolbar/static/debug_toolbar/js

1 file changed

+13
-13
lines changed

debug_toolbar/static/debug_toolbar/js/utils.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ const $$ = {
88
}
99
});
1010
},
11+
/**
12+
* This is a helper function to attach a handler for a `djdt.panel.render`
13+
* event of a specific panel.
14+
*
15+
* root: The container element that the listener should be attached to.
16+
* panelId: The Id of the panel.
17+
* fn: A function to execute when the event is triggered.
18+
*/
1119
onPanelRender(root, panelId, fn) {
12-
/*
13-
This is a helper function to attach a handler for a `djdt.panel.render`
14-
event of a specific panel.
15-
16-
root: The container element that the listener should be attached to.
17-
panelId: The Id of the panel.
18-
fn: A function to execute when the event is triggered.
19-
*/
2020
root.addEventListener("djdt.panel.render", (event) => {
2121
if (event.detail.panelId === panelId) {
2222
fn.call(event);
@@ -48,12 +48,12 @@ const $$ = {
4848
document.head.appendChild(el);
4949
}
5050
},
51+
/**
52+
* Given a container element, apply styles set via data-djdt-styles attribute.
53+
* The format is data-djdt-styles="styleName1:value;styleName2:value2"
54+
* The style names should use the CSSStyleDeclaration camel cased names.
55+
*/
5156
applyStyles(container) {
52-
/*
53-
* Given a container element, apply styles set via data-djdt-styles attribute.
54-
* The format is data-djdt-styles="styleName1:value;styleName2:value2"
55-
* The style names should use the CSSStyleDeclaration camel cased names.
56-
*/
5757
for (const element of container.querySelectorAll(
5858
"[data-djdt-styles]"
5959
)) {

0 commit comments

Comments
 (0)