
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@govflanders/vl-widget-global-footer-types
Advanced tools
This guide is for developers looking to integrate the Flanders Global Footer into their websites.
You can integrate the Flanders Global Footer into your website using one of two methods: the entry script or the embed script. Each serves a different purpose.
đź’ˇ Note: The embed URL has been updated to use api/v2 instead of api/v1.
Use the embed script for quick and automatic integration with minimal setup. The embed script is meant to be placed directly inside the DOM where you want the footer to appear. It automatically renders the footer at the script's location in the HTML.
Example of using the embed script:
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Global Footer Embed Script Example</title>
</head>
<body>
<div class="your-website-code">đź‘‹ Hello world</div>
<!-- For the UUID, you should use your widget-id -->
<!-- If you want to use the TNI environment, use https://widgets.tni-vlaanderen.be instead -->
<script src="https://widgets.vlaanderen.be/api/v2/widget/your-global-footer-id/embed"></script>
</body>
</html>
⚠️ Warning: The window.globalFooterClient object will only be available after the script is resolved. If you need direct access to the window.globalFooterClient, use the entry script.
Use the entry script if you need more control over when, where, and how the footer is mounted. The entry script should be placed in the <head> section of your HTML, preferably at the top. This ensures that the window.globalFooterClient object is available after the script has loaded. With the entry script, the footer does not render automatically, so you'll need to call the mount method to display it.
Example of using the entry script:
<!DOCTYPE html>
<html lang="nl">
<head>
<!-- For the UUID, you should use your widget-id -->
<!-- If you want to use the TNI environment, use https://widgets.tni-vlaanderen.be instead -->
<script src="https://widgets.vlaanderen.be/api/v2/widget/your-global-footer-id/entry"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Global Footer Entry Script Example</title>
</head>
<body>
<div class="your-website-code">đź‘‹ Hello world</div>
<script>
window.globalFooterClient.mount(); // Mount the footer manually after the script has loaded
</script>
</body>
</html>
<head>, requires manual mounting with the window.globalFooterClient.mount() method.window.globalFooterClient APIThe widget is available on the global window object as window.globalFooterClient. You can import the types from global-footer-types to use them in your project, especially if you're using TypeScript (more info here).
Example of using the window.globalFooterClient object in JavaScript:
const client = window.globalFooterClient;
const privacyLink = {
title: 'Privacy Policy',
href: '/privacy-policy',
};
const termsLink = {
title: 'Terms of Service',
href: '/terms',
};
client.setNavigationLinks([
privacyLink,
termsLink,
]);
Checkout the GlobalFooterClient here to see all the available methods.
If you’re currently using version 4 of the Global Footer Widget, please follow this guide to upgrade to version 5. This guide highlights the key changes and steps you need to take to ensure a smooth transition.
No more client library or polyfill scripts: In version 5, you no longer need to include any additional client library or polyfill script links in your HTML. Access to the window.globalFooterClient object is automatically provided when you include either the entry script or the embed script.
Action Required:
<script> tags that reference client libraries or polyfill libraries for the widget.Script-based integration only: Version 5 removes the need for installable packages via npm or yarn. All functionalities are now accessible by including script tags directly in your HTML’s <head> or <body> section.
Action Required:
Version Update in Embed Links: If you’re using the embed script method to include the widget, you need to update the version number in your script’s src URL from v1 to v2. Example here.
API Changes: The window.globalFooterClient API has been updated in version 5. Methods, their signatures, and usage patterns may have changed. Refer to the GlobalFooterClient section for detailed information on the new methods and their parameters.
Action Required:
window.globalFooterClient.Example:
// Using widgets V4
- vl.widget.client.capture(
- // Verplichte capture functie.
- function(widget) {
- if (widget.getPluginTypeId() === 'global_footer') {
- widget.getUmbrella();
- }
- },
- );
// Using widgets V5
+ await globalFooterClient.getUmbrella();
window.globalFooterClientUnified Access via Scripts: In version 5, you can access the window.globalFooterClient object regardless of whether you use the entry script or the embed script.
Action Required:
window.globalFooterClient.After integrating version 5 of the widget into your website, it’s important to thoroughly review its appearance and functionality to ensure everything works as expected. Some styling adjustments might be necessary due to changes in the widget’s design or your site’s CSS.
Action Required:
The Global Footer Widget v5 now supports multiple languages. The widget automatically adapts to the language of the document. It observes the lang attribute on the <html> tag, so it's the implementer's responsibility to handle any language switching functionality. If the lang attribute changes, the widget will update to display the correct language.
Supported languages:
To change the document language, you can use the following JavaScript snippet:
window.document.documentElement.lang = 'nl'; // 'nl', 'en', 'de' or 'fr'
This will switch the document's language to Dutch, and the widget will automatically reflect the change.
Notes:
NL or nl-BE).The Global Footer Widget supports the two most recent versions of all major browsers:
Please ensure your users are on the latest versions of these browsers to guarantee full functionality of the widget.
The @govflanders/vl-widget-global-footer-types package provides TypeScript types and interfaces for interacting with the Global Footer Widget. This widget is embedded in customer web pages and exposes a client object (window.globalFooterClient) that allows for dynamic configuration and interaction with the global footer.
By using the types defined in this package, developers can ensure type-safe interactions with the widget while improving their development experience (DX) by utilizing autocompletion and built-in documentation.
To install the global-footer-types package, use the following command:
npm install -D @govflanders/vl-widget-global-footer-types
or
yarn add -D @govflanders/vl-widget-global-footer-types
Note: It’s recommended to use the caret (^) symbol in your package.json to stay updated with the latest minor and patch versions.
Example of using the types to interact with the widget:
import { GlobalFooterClient, NavigationLink } from '@govflanders/vl-widget-global-footer-types';
const client: GlobalFooterClient = window.globalFooterClient;
const privacyLink: NavigationLink = {
title: 'Privacy Policy',
href: '/privacy-policy',
};
const termsLink: NavigationLink = {
title: 'Terms of Service',
href: '/terms',
};
client.setNavigationLinks([
privacyLink,
termsLink,
]);
To ensure the secure integration of the Global Footer Widget, you need to configure your Content Security Policy (CSP) with the following directives:
The minimum required CSP directives for using the global-footer in a production environment are:
| Directive | Value |
|---|---|
connect-src | https://widgets.vlaanderen.be |
font-src | https://ui.vlaanderen.be |
font-src | https://assets.vlaanderen.be |
font-src | https://widgets.vlaanderen.be |
img-src | data: |
img-src | https://assets.vlaanderen.be |
img-src | https://widgets.vlaanderen.be |
script-src | https://widgets.vlaanderen.be |
The minimum required CSP directives for using the global-footer in a TNI environment are:
| Directive | Value |
|---|---|
connect-src | https://widgets.tni-vlaanderen.be |
font-src | https://ui.vlaanderen.be |
font-src | https://assets.vlaanderen.be |
font-src | https://widgets.tni-vlaanderen.be |
img-src | data: |
img-src | https://assets.vlaanderen.be |
img-src | https://widgets.tni-vlaanderen.be |
script-src | https://widgets.tni-vlaanderen.be |
If you need assistance or have any questions regarding the Global Footer Widget, feel free to reach out to us:
Our team is here to help with any issues or inquiries you might have.
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.