Skip to content

Commit

Permalink
Add JSDoc for initAll function
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed Sep 14, 2022
1 parent e0353e9 commit 8bbce58
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/govuk/all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ import Radios from './components/radios/radios.mjs'
import SkipLink from './components/skip-link/skip-link.mjs'
import Tabs from './components/tabs/tabs.mjs'

/**
* Initialise all components
*
* Use the `data-module` attributes to find, instantiate and init all of the
* components provided as part of GOV.UK Frontend.
*
* @param {Object} [options]
* @param {HTMLElement} [options.scope=document] - scope to query for components
* @param {Object} [options.accordion] - accordion config
* @param {Object} [options.notificationBanner] - notification banner config
*/
function initAll (options) {
// Set the options to an empty object by default if no options are passed.
options = typeof options !== 'undefined' ? options : {}
Expand Down

0 comments on commit 8bbce58

Please sign in to comment.