Issue #3443868 by Linh Le, YevKo: Add documentation to arrow-navigation.js

merge-requests/7514/merge
Lauri Eskola 2024-04-27 14:35:49 +03:00 committed by catch
parent 62f43ebcaa
commit 395e146170
1 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,17 @@
/**
* @file
* Keyboard navigation component.
*/
((Drupal, once, { focusable }) => { ((Drupal, once, { focusable }) => {
/**
* Attaches the keyboard navigation functionality.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches the behavior to the `.admin-toolbar` element.
*/
Drupal.behaviors.keyboardNavigation = { Drupal.behaviors.keyboardNavigation = {
attach: (context) => { attach: (context) => {
once('keyboard-processed', '.admin-toolbar', context).forEach( once('keyboard-processed', '.admin-toolbar', context).forEach(