Skip to content

Commit e771bc2

Browse files
[WIP] Document breaking changes
1 parent 266f664 commit e771bc2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/upgrade-to-6.0.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Upgrading to 6.0
2+
3+
There are some breaking changes you'll need to be aware of when upgrading to v6. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v10](https://github.com/nhsuk/nhsuk-frontend/releases/tag/v10.0.0) which also includes breaking changes.
4+
5+
## Breaking changes
6+
7+
### Update the JavaScript supported script snippet
8+
9+
For NHS.UK React components v4.x we recommended `<body class="js-enabled">` to enable styling for JavaScript only features.
10+
11+
You must now use the NHS.UK frontend v10.x feature detection snippet to detect `<script type="module">` support:
12+
13+
```patch
14+
- <body class="js-enabled">
15+
+ <body>
16+
+ <script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' nhsuk-frontend-supported' : '');</script>
17+
```

0 commit comments

Comments
 (0)