Installation
Including Supertab.js on your page
Before launching an experience you must first install and initialize Supertab.js
You must have a Supertab clientId
to use Supertab.js.
You can find the clientId
associated with each of your sites in the business portal.
From npm
For use with bundlers, you can install Supertab.js from the npm registry.
Then import the Supertab
class and instantiate it:
From CDN
You can load Supertab.js from our CDN using either a direct ES Module import or by using the global loader script.
With an ES Module import
The compiled module exports the Supertab
class.
With the global loader function
For environments that don’t support ES modules, you can use the global loader. This script exposes the global function window.loadSupertab()
. It returns a promise that resolves with the Supertab
class..
You can handle promises through the use of async / await or through promise chaining with .then().
Versioning
The CDN URL is versioned, including v3
will automatically upgrade you to new minor versions.
Breaking changes are included in new major versions.