Class: WebIntegrator
WebIntegrator
Helper class, inject DigitalInk dependencies.Provides CDN integration, ECMA6 (importmap) integration and Worker imports integration.
Dependency URI template: ${DEPENDENCIES_SRC}/dependency-sub-path
It is not part of DigitalInk namespace. Could be accesed on digital-ink/web-integrator.
Methods
(static) getCDNImports(baseURIopt) → {object}
Provides dependencies importmap
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
baseURI | URI | <optional> | "" | Appends prefix on every dependency template |
Returns:
DigitalInk dependencies importmap
Type
object
(static) integrate(baseURIopt)
Provides CDN integration. Compose script tags and appends it in html page header.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
baseURI | URI | <optional> | "" | Appends prefix on every dependency template |
(static) integrateECMA6(importsopt, baseURIopt)
Provides ECMA6 integration. Compose importmap and appends it in html page header.Workers defaults to CDN concept with importScripts.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
imports | object | <optional> | Additional set of app dependencies (currently browsers supports only one importmap) | |
baseURI | URI | <optional> | "" | Appends prefix on every dependency template |