Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
JSDocs go above a function not below
  • Loading branch information
codingjoe committed Apr 22, 2026
commit 076513908073613796a0139ae627504bfb050ef2
26 changes: 13 additions & 13 deletions debug_toolbar/static/debug_toolbar/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const $$ = {
}
});
},
/**
* This is a helper function to attach a handler for a `djdt.panel.render`
* event of a specific panel.
*
* root: The container element that the listener should be attached to.
* panelId: The Id of the panel.
* fn: A function to execute when the event is triggered.
*/
onPanelRender(root, panelId, fn) {
/*
This is a helper function to attach a handler for a `djdt.panel.render`
event of a specific panel.

root: The container element that the listener should be attached to.
panelId: The Id of the panel.
fn: A function to execute when the event is triggered.
*/
root.addEventListener("djdt.panel.render", (event) => {
if (event.detail.panelId === panelId) {
fn.call(event);
Expand Down Expand Up @@ -48,12 +48,12 @@ const $$ = {
document.head.appendChild(el);
}
},
/**
* Given a container element, apply styles set via data-djdt-styles attribute.
* The format is data-djdt-styles="styleName1:value;styleName2:value2"
* The style names should use the CSSStyleDeclaration camel cased names.
*/
applyStyles(container) {
/*
* Given a container element, apply styles set via data-djdt-styles attribute.
* The format is data-djdt-styles="styleName1:value;styleName2:value2"
* The style names should use the CSSStyleDeclaration camel cased names.
*/
for (const element of container.querySelectorAll(
"[data-djdt-styles]"
)) {
Expand Down