govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Move responsibilities from `initAll` to the components

Open 36degrees opened this issue 2 months ago • 1 comments

What

Move as many responsibilities from initAll to the components so that initAll is doing as little as possible.

For example, the data-module selector is only defined in initAll.

Add any new methods to the JavaScript API reference

Why

To make it easier to include the JS for components without needing to import or use the initAll function.

Who needs to know about this

Developers

Done when

  • [x] initAll does as little as possible.
  • [ ] Any new methods are clearly documented in the JavaScript API reference

36degrees avatar Apr 19 '24 14:04 36degrees