initializeFluid()
Manually initializes the SDK. Usually not needed as the SDK auto-initializes from script tag attributes.
Signature
window.FairShareSDK.initializeFluid(options);
Parameters
| Parameter | Type | Description |
|---|---|---|
options | object | Initialization options |
Options:
| Property | Type | Required | Description |
|---|---|---|---|
fluidShop | string | Yes | Shop identifier |
debug | boolean | No | Enable debug mode |
Example
window.FairShareSDK.initializeFluid({ fluidShop: "your-shop-id", debug: true, });
When to Use
Most applications should use the script tag data attributes instead:
<script id="fluid-cdn-script" src="https://assets.fluid.app/scripts/fluid-sdk/latest/web-widgets/index.js" data-fluid-shop="your-shop-id" data-debug="true" ></script>
Use initializeFluid() only when you need dynamic configuration at runtime.
Related
- Installation — Setup guide
- reset — Reset SDK state