Skip to content

Commit

Permalink
Add isSupported to all.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpatrickpatrick committed Aug 19, 2024
1 parent 2b1159c commit c8881d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/govuk-frontend/src/govuk/all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export { Radios } from './components/radios/radios.mjs'
export { SkipLink } from './components/skip-link/skip-link.mjs'
export { Tabs } from './components/tabs/tabs.mjs'
export { initAll, createAll } from './init.mjs'
export { isSupported } from './common/index.mjs'

/**
* @typedef {import('./init.mjs').Config} Config
Expand Down
3 changes: 2 additions & 1 deletion packages/govuk-frontend/src/govuk/all.puppeteer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ describe('GOV.UK Frontend', () => {
it('exports Components', async () => {
const components = exported
.filter(
(method) => !['initAll', 'createAll', 'version'].includes(method)
(method) =>
!['initAll', 'createAll', 'version', 'isSupported'].includes(method)
)
.sort()

Expand Down
1 change: 0 additions & 1 deletion packages/govuk-frontend/src/govuk/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ export function setFocus($element, options = {}) {
* Some browsers will load and run our JavaScript but GOV.UK Frontend
* won't be supported.
*
* @internal
* @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support
* @returns {boolean} Whether GOV.UK Frontend is supported on this page
*/
Expand Down

0 comments on commit c8881d8

Please sign in to comment.