- Serve the bundle as an asset
- Load the bundle as a module
- Instantiate the
product-configuratorCWC - 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
theinitializemethod.
await customElemnts
.whenDefined('product-configurator')
const element = document
.querySelector(`product-configurator`)
element.initialize({ api })