Skip to main content

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:
NameTypeAttributesDefaultDescription
baseURIURI<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:
NameTypeAttributesDefaultDescription
baseURIURI<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:
NameTypeAttributesDefaultDescription
importsobject<optional>Additional set of app dependencies (currently browsers supports only one importmap)
baseURIURI<optional>""Appends prefix on every dependency template

Home