Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: seaemsi <50173207+seaemsi@users.noreply.github.com>
  • Loading branch information
romaricpascal and seaemsi authored Sep 26, 2024
1 parent 4db92ab commit 20a0559
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ For advice on how to use these release notes see [our guidance on staying up to

### New features

#### Components can no longer initialise twice on the same element
#### Components can no longer be initialised twice on the same element

GOV.UK Frontend components now throw an error if they had already been initialised on the DOM Element they're receiving for initialisation.
This avoids components to be initialised more than once, causing them to not work properly.
GOV.UK Frontend components now throw an error if they've already been initialised on the DOM Element they're receiving for initialisation.
This prevents components from being initialised more than once and therefore not working properly.

We introduced this change in [pull request #5272: Prevent multiple initialisations of a single component instance](https://github.com/alphagov/govuk-frontend/pull/5272)

#### Respond to initialisation errors when using `createAll` and `initAll`

We've added a new `onError` option for `createAll` and `initAll` that lets you respond to initialisation errors.
The functions will carry on catching errors and initialising components further down the page if one fails to initialise,
but this option will let you react to a component failing to initialise (for example reporting to an error monitoring service).
The functions will continue catching errors and initialising components further down the page if one component fails to initialise,
but this option will let you react to a component failing to initialise (for example, reporting to an error monitoring service).

We introduced this change in:

Expand All @@ -26,8 +26,8 @@ We introduced this change in:

#### Check if GOV.UK Frontend is supported

We've added the `isSupported` function to let you check if GOV.UK Frontend is supported in the browser your script is running.
GOV.UK Frontend components will check this automatically, but you may want to do it as well to avoid running some code when GOV.UK Frontend is not supported.
We've added the `isSupported` function to let you check if GOV.UK Frontend is supported in the browser where your script is running.
GOV.UK Frontend components will check this automatically, but you may want to use the `isSupported` function to avoid running some code when GOV.UK Frontend is not supported.

We introduced this change in [pull request #5250: Add `isSupported` to `all.mjs`](https://github.com/alphagov/govuk-frontend/pull/5250)

Expand Down

0 comments on commit 20a0559

Please sign in to comment.