- Serve the bundle as an asset
- Load the bundle as a module
- Instantiate the
product-configurator
CWC - Provide the data as a JSON script tag
Create & load a module that defines the interface.
-
Await the custom element
(product-configurator
) -
Query the CWC element.
-
Initiates the interface via
theinitialize
method.
await customElemnts
.whenDefined('product-configurator')
const element = document
.querySelector(`product-configurator`)
element.initialize({ api })