[assets] Tweak JSDoc.

This commit is contained in:
Fabien Basmaison
2021-04-07 10:37:11 +02:00
parent fb45df0f99
commit 54805afb51
3 changed files with 19 additions and 23 deletions

View File

@ -1,13 +1,23 @@
/**
* Toggle all descendant checkboxes of a target.
*
* Use `data-target="ID_OF_TARGET"` on the node on which the event is listened
* to (checkbox, button, link…), where_ID_OF_TARGET_ should be the ID of an
* ancestor for the checkboxes.
*/
(function() {
'use strict';
/**
* Toggle all descendant checkboxes of a target.
*
* Use `data-target="ID_OF_TARGET"` on the node on which the event is listened
* to (checkbox, button, link…), where_ID_OF_TARGET_ should be the ID of an
* ancestor for the checkboxes.
*
* @example
* <input
* type="checkbox"
* data-action="toggle-all"
* data-target="failed-imports"
* >
* @param {Event} event
* @return {undefined}
*/
function toggleAllCheckboxes(event) {
const mainCheckbox = event.target;