Skip to content

Commit

Permalink
Clarify purpose of <script type="module">
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Dec 8, 2023
1 parent af6fb2c commit e8b73f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/importing-css-assets-and-javascript/index.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ You can also use your own function to generate paths, for example if you're usin

## JavaScript

GOV.UK Frontend JavaScript must be run with `<script type="module">`.
This protects older browsers, including all versions of Internet Explorer, from running modern JavaScript that it does not support. Read about our [browser support](../browser-support/) for more information.
### Before you start
You'll need to add the following to the top of the `<body class="govuk-template__body">` section of your page template if you're not [using our Nunjucks macros](/use-nunjucks/).
Expand Down

0 comments on commit e8b73f4

Please sign in to comment.